posix-timer-0.2: Bindings to POSIX clock and timer functions.

System.Posix.Timer

Description

POSIX timers.

Synopsis

Documentation

data ITimerSpec Source

Mirrors struct itimerspec.

data Timer Source

Mirrors timer_t.

createTimerSource

Arguments

:: 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).

configureTimerSource

Arguments

:: 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).

timerOverrunCnt :: MonadBase μ IO => Timer -> μ CIntSource

Get the timer overrun count. See timer_getoverrun(3).

destroyTimer :: MonadBase μ IO => Timer -> μ ()Source

Destroy the timer. See timer_delete(3).