suspend-0.1.0.1: Simple package that allows for long thread suspensions.

Safe HaskellSafe-Infered

Control.Concurrent.Suspend.Lifted

Synopsis

Documentation

suspend :: MonadBase IO m => Delay -> m ()Source

Analogy of threadDelay that allows for longer delays.

Suspends the current thread for the given delay (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.

data Delay Source

DELAY

TODO: * Add overflow checks.

Type representing delay in microseconds.

usDelay :: Int64 -> DelaySource

Delay in microseconds.

msDelay :: Int64 -> DelaySource

Delay in milliseconds.

sDelay :: Int64 -> DelaySource

Delay in seconds.

mDelay :: Int64 -> DelaySource

Delay in minutes.

hDelay :: Int64 -> DelaySource

Delay in hours.

(.+.) :: Delay -> Delay -> DelaySource

Sums two delays.