Copyright | (c) The University of Glasgow 2002 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | William N. Halchin (vigalchin@gmail.com) |
Stability | provisional |
Portability | non-portable (requires POSIX) |
Safe Haskell | None |
Language | Haskell98 |
POSIX Realtime Timer and Clock support. See http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html.
- 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
timerDelete :: TimerId -> IO () Source
Delete a timer.
timerSetTime :: TimerId -> SetTimeFlag -> ItimerSpec -> IO ItimerSpec Source
Set the timer state.
timerGetTime :: TimerId -> IO ItimerSpec Source
Get the timer state.
timerGetOverrun :: TimerId -> IO Int Source
Get the timer overrun count.
clockGetRes :: ClockId -> IO TimeSpec Source
Get clock resolution.
clockGetTime :: ClockId -> IO TimeSpec Source
Get clock time.
clockSetTime :: ClockId -> TimeSpec -> IO () Source
Set clock time.