Portability | non-portable (requires POSIX) |
---|---|
Stability | provisional |
Maintainer | William N. Halchin (vigalchin@gmail.com) |
Safe Haskell | None |
POSIX Realtime Timer and Clock support
- type TimerId = Int
- data ClockId
- data SetTimeFlag = Timer_Abstime
- timerCreate :: ClockId -> Maybe Sigevent -> IO TimerId
- timerDelete :: TimerId -> IO ()
- timerSetTime :: TimerId -> SetTimeFlag -> ItimerSpec -> IO ItimerSpec
- timerGetTime :: TimerId -> IO ItimerSpec
- timerGetOverrun :: TimerId -> IO Int
- clockGetRes :: ClockId -> IO TimeSpec
- clockGetTime :: ClockId -> IO TimeSpec
- clockSetTime :: ClockId -> TimeSpec -> IO ()
Documentation
timerCreate :: ClockId -> Maybe Sigevent -> IO TimerIdSource
Create a realtime timer
timerDelete :: TimerId -> IO ()Source
Delete the timer designated by timerId.
timerSetTime :: TimerId -> SetTimeFlag -> ItimerSpec -> IO ItimerSpecSource
Set the current timer state
timerGetTime :: TimerId -> IO ItimerSpecSource
Get the current timer state
timerGetOverrun :: TimerId -> IO IntSource
Get the timer overrun count!
clockGetRes :: ClockId -> IO TimeSpecSource
Get clock resolution
clockGetTime :: ClockId -> IO TimeSpecSource
Get clock time
clockSetTime :: ClockId -> TimeSpec -> IO ()Source
Set clock time