Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
System.Posix.Timer
Description
POSIX timers.
Synopsis
- 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.
Constructors
ITimerSpec | |
Fields |
Instances
Storable ITimerSpec Source # | |
Defined in System.Posix.Timer Methods sizeOf :: ITimerSpec -> Int # alignment :: ITimerSpec -> Int # peekElemOff :: Ptr ITimerSpec -> Int -> IO ITimerSpec # pokeElemOff :: Ptr ITimerSpec -> Int -> ITimerSpec -> IO () # peekByteOff :: Ptr b -> Int -> IO ITimerSpec # pokeByteOff :: Ptr b -> Int -> ITimerSpec -> IO () # peek :: Ptr ITimerSpec -> IO ITimerSpec # poke :: Ptr ITimerSpec -> ITimerSpec -> IO () # | |
Show ITimerSpec Source # | |
Defined in System.Posix.Timer Methods showsPrec :: Int -> ITimerSpec -> ShowS # show :: ITimerSpec -> String # showList :: [ITimerSpec] -> ShowS # | |
Eq ITimerSpec Source # | |
Defined in System.Posix.Timer |
Mirrors timer_t.
Instances
Storable Timer Source # | |
Show Timer Source # | |
Eq Timer Source # | |
Ord Timer 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).
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).