POSIX timers.
- data ITimerSpec = ITimerSpec {}
- data Timer
- createTimer :: Clock -> Maybe (Signal, WordPtr) -> IO Timer
- configureTimer :: Timer -> Bool -> TimeSpec -> TimeSpec -> IO (TimeSpec, TimeSpec)
- timerTimeLeft :: Timer -> IO (TimeSpec, TimeSpec)
- timerOverrunCnt :: Timer -> IO CInt
- destroyTimer :: Timer -> IO ()
Documentation
data ITimerSpec Source
Mirrors struct itimerspec.
:: Clock | |
-> Maybe (Signal, WordPtr) | Optional signal to raise on timer expirations and value of siginfo.si_value. |
-> IO Timer |
Create a timer. See timer_create(3).
:: Timer | |
-> Bool | Whether the expiration time is absolute. |
-> TimeSpec | Expiration time. Zero value disarms the timer. |
-> TimeSpec | Interval between subsequent expirations. |
-> IO (TimeSpec, TimeSpec) |
Setup the timer. See timer_settime(3).
timerTimeLeft :: Timer -> IO (TimeSpec, TimeSpec)Source
Get the amount of time left until the next expiration and the interval between the subsequent expirations. See timer_gettime(3).
timerOverrunCnt :: Timer -> IO CIntSource
Get the timer overrun count. See timer_getoverrun(3).
destroyTimer :: Timer -> IO ()Source
Destroy the timer. See timer_delete(3).