| Safe Haskell | Safe-Infered |
|---|
Control.Concurrent.Timer
Documentation
The data type representing the timer. For now, the action and delay are fixed for the lifetime of the Timer.
Arguments
| :: 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.
Arguments
| :: Delay | The (minimal) delay between executions. |
| -> IO () | The action to be executed. |
| -> IO TimerIO |
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.