Module

Pinto.Timer

This module provides a means of using the timer functionality in core Erlang It'll work anywhere, it's up to you to route the messages sensibly once you have them in the callback Tip: See 'emitter' in Gen

#sendEvery

sendEvery :: forall m msg. MonadEffect m => HasSelf m msg => Milliseconds -> msg -> m TimerRef

sends a message to 'self' every 'N' milliseconds See also timer:send_every in the OTP docs Note: This uses the old Timer API

#sendAfter

sendAfter :: forall m msg. MonadEffect m => HasSelf m msg => Milliseconds -> msg -> m TimerRef

sends a message to 'self' after 'N' milliseconds See also erlang:send_after in the OTP docs Note: This uses the new Timer API

#sendEveryTo

sendEveryTo :: forall msg process. HasProcess msg process => Milliseconds -> msg -> process -> Effect TimerRef

Send msg to process every 'N' milliseconds See also timer:send_every in the OTP docs Note: This uses the old Timer API

#sendAfterTo

sendAfterTo :: forall msg process. HasProcess msg process => Milliseconds -> msg -> process -> Effect TimerRef

Send msg to process after 'N' milliseconds See also erlang:send_after in the OTP docs Note: This uses the new Timer API

#cancel

cancel :: TimerRef -> Effect Unit

Given a TimerRef, cancels the timer as per timer:cancel/erlang:cancel_timer in the OTP docs

#TimerRef

Modules