threadDelay is:exact
Suspends the current thread for a given number of microseconds (GHC
only).
There is no guarantee that the thread will be rescheduled promptly
when the delay has expired, but the thread will never continue to run
earlier than specified.
Be careful not to exceed maxBound :: Int, which on 32-bit
machines is only 2147483647 μs, less than 36 minutes. Consider using
Control.Concurrent.Thread.Delay.delay from
unbounded-delays package.
Suspends the current thread for a given number of microseconds (GHC
only).
There is no guarantee that the thread will be rescheduled promptly
when the delay has expired, but the thread will never continue to run
earlier than specified.
Yields the current thread, and optionally suspends the current thread
for a given number of microseconds.
If suspended, there is no guarantee that the thread will be
rescheduled promptly when the delay has expired, but the thread will
never continue to run earlier than specified.
threadDelay _ = yield
Convenient version of
threadDelay which takes any time-unit and
operates in any MonadIO.
>>> threadDelay $ sec 2
>>> threadDelay (2 :: Time Second)
>>> threadDelay @Second 2