File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,5 +33,8 @@ infoShow = liftEffect <<< EffConsole.infoShow
3333time :: forall m . MonadEffect m => String -> m Unit
3434time = liftEffect <<< EffConsole .time
3535
36+ timeLog :: forall m . MonadEffect m => String -> m Unit
37+ timeLog = liftEffect <<< EffConsole .timeLog
38+
3639timeEnd :: forall m . MonadEffect m => String -> m Unit
3740timeEnd = liftEffect <<< EffConsole .timeEnd
Original file line number Diff line number Diff line change @@ -35,6 +35,13 @@ exports.time = function (s) {
3535 } ;
3636} ;
3737
38+ exports . timeLog = function ( s ) {
39+ return function ( ) {
40+ console . timeLog ( s ) ;
41+ return { } ;
42+ } ;
43+ } ;
44+
3845exports . timeEnd = function ( s ) {
3946 return function ( ) {
4047 console . timeEnd ( s ) ;
Original file line number Diff line number Diff line change @@ -48,5 +48,8 @@ infoShow a = info (show a)
4848-- | Start a named timer.
4949foreign import time :: String -> Effect Unit
5050
51+ -- | Print the time since a named timer started in milliseconds.
52+ foreign import timeLog :: String -> Effect Unit
53+
5154-- | Stop a named timer and print time since it started in milliseconds.
5255foreign import timeEnd :: String -> Effect Unit
You can’t perform that action at this time.
0 commit comments