Safe Haskell | None |
---|---|
Language | Haskell2010 |
Lifted and typed threadDelay
and timeout
functions.
- threadDelay :: (MonadBase IO m, ToDuration t) => t -> m ()
- timeout :: (MonadBaseControl IO m, ToDuration t) => t -> m a -> m (Maybe a)
- module Data.Duration
Documentation
threadDelay :: (MonadBase IO m, ToDuration t) => t -> m () Source #
Examples:
threadDelay (1 :: Second) threadDelay (100 :: Microseconds) threadDelay (1 # Second + 50 # Milliseconds)
timeout :: (MonadBaseControl IO m, ToDuration t) => t -> m a -> m (Maybe a) Source #
module Data.Duration