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