Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- threadDelaySeconds :: RealFrac n => n -> IO ()
- threadDelaySecondsLimit :: Fractional n => n
- threadSleepForSeconds :: RealFrac n => n -> IO ()
Documentation
threadDelaySeconds :: RealFrac n => n -> IO () Source #
Pause current thread for the indicated duration (in seconds), see pauseThreadLimit
.
threadDelaySecondsLimit :: Fractional n => n Source #
The number of seconds that threadDelaySeconds
can wait for.
Values larger than this require a different thread delay mechanism, see threadSleepForSeconds
.
The value is the number of microseconds in maxBound::Int
.
For 64-bit architectures this is not likely to be an issue, however for 32-bit it can be.
round ((2 ** 31) / (60 * 60) / 1e6) == 1 -- hours round ((2 ** 63) / (60 * 60 * 24 * 365 * 100) / 1e6) == 2925 -- years
threadSleepForSeconds :: RealFrac n => n -> IO () Source #
Sleep current thread for the indicated duration (in seconds).
Divides long sleeps into parts smaller than threadSleepForSeconds
.