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

Safe HaskellNone
LanguageHaskell98

System.Posix.Timer

Description

POSIX timers.

Synopsis

Documentation

data Timer Source #

Mirrors timer_t.

Instances

Eq Timer Source # 

Methods

(==) :: Timer -> Timer -> Bool #

(/=) :: Timer -> Timer -> Bool #

Ord Timer Source # 

Methods

compare :: Timer -> Timer -> Ordering #

(<) :: Timer -> Timer -> Bool #

(<=) :: Timer -> Timer -> Bool #

(>) :: Timer -> Timer -> Bool #

(>=) :: Timer -> Timer -> Bool #

max :: Timer -> Timer -> Timer #

min :: Timer -> Timer -> Timer #

Show Timer Source # 

Methods

showsPrec :: Int -> Timer -> ShowS #

show :: Timer -> String #

showList :: [Timer] -> ShowS #

Storable Timer Source # 

Methods

sizeOf :: Timer -> Int #

alignment :: Timer -> Int #

peekElemOff :: Ptr Timer -> Int -> IO Timer #

pokeElemOff :: Ptr Timer -> Int -> Timer -> IO () #

peekByteOff :: Ptr b -> Int -> IO Timer #

pokeByteOff :: Ptr b -> Int -> Timer -> IO () #

peek :: Ptr Timer -> IO Timer #

poke :: Ptr Timer -> Timer -> IO () #

createTimer Source #

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

configureTimer Source #

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 -> μ CInt Source #

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

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

Destroy the timer. See timer_delete(3).