Safe Haskell | Safe-Infered |
---|
Documentation
The data type representing the timer. For now, the action and delay are fixed for the lifetime of the Timer.
:: Delay | The (minimal) time until the execution in microseconds. |
-> IO () | The action to be executed. |
-> IO TimerIO |
Executes the the given action once after the given delay elapsed, no sooner, maybe later.
oneShotRestart :: TimerIO -> IO BoolSource
Attempts to restart (or start) a timer making it a one shot timer.
Returns True if the restrat was successful, otherwise (e.g. other thread is attempting to restart the timer) returns False.
Executes the the given action repeatedly with at least the given delay between executions.
repeatedRestart :: TimerIO -> IO BoolSource
Attempts to restart (or start) a timer making it a repeated timer.
Returns True if the restrat was successful, otherwise (e.g. other thread is attempting to restart the timer) returns False.
Creates a new timer. This does not start the timer.