Temporal representations and clock operations (read current time and pause thread).
- type NTPi = Word64
- data Time
- as_ntpi :: Time -> NTPi
- as_utcr :: Time -> Double
- ntpr_ntpi :: Double -> NTPi
- ntpi_ntpr :: NTPi -> Double
- utcr_ntpi :: Double -> NTPi
- ntpr_utcr :: Double -> Double
- ntpi_utcr :: NTPi -> Double
- utc_base :: UTCTime
- immediately :: Time
- utcr :: IO Double
- ntpi :: IO NTPi
- pauseThreadLimit :: Double
- pauseThread :: Double -> IO ()
- pauseThreadUntil :: Double -> IO ()
- sleepThread :: Double -> IO ()
- sleepThreadUntil :: Double -> IO ()
Temporal types
Time is represented in either UTC
or NTP
form. The NTP
form may
be either integral or real.
ntpr_utcr :: Double -> DoubleSource
Convert a real-valued NTP timestamp to a real-valued UTC timestamp.
Constant indicating the bundle is to be executed immediately.
Clock operations
pauseThreadLimit :: DoubleSource
The pauseThread
limit (in seconds). Values larger than this
require a different thread delay mechanism, see sleepThread
. The
value is the number of microseconds in maxBound::Int
.
pauseThread :: Double -> IO ()Source
Pause current thread for the indicated duration (in seconds), see
pauseThreadLimit
. Note also that this function does not
attempt pauses less than 1e-4
.
pauseThreadUntil :: Double -> IO ()Source
Pause current thread until the given real-valued UTC
time, see
pauseThreadLimit
.
sleepThread :: Double -> IO ()Source
Sleep current thread for the indicated duration (in seconds).
Divides long sleeps into parts smaller than pauseThreadLimit
.
sleepThreadUntil :: Double -> IO ()Source
Sleep current thread until the given real-valued UTC
time.
Divides long sleeps into parts smaller than pauseThreadLimit
.