hmt-base-0.20: Haskell Music Theory Base
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Concurrent

Synopsis

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.