mock-time-0.1.0: Mock time in tests
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Time

Synopsis

Documentation

class Monad m => MonadTime m where Source #

A class interface with overridable time implementation. Import DefaultInstance for the default implementation using the real underlying time functions. See SimulatedTime for an instance that allows to control time.

Instances

Instances details
MonadTime IO Source # 
Instance details

Defined in Control.Monad.Time.DefaultInstance

(MonadTime m, MonadTrans t, Monad (t m)) => MonadTime (t m) Source # 
Instance details

Defined in Control.Monad.Time

Methods

getCurrentTime :: t m UTCTime Source #

threadDelay :: Int -> t m () Source #

MonadIO m => MonadTime (SimulatedTimeT m) Source # 
Instance details

Defined in Control.Monad.Trans.SimulatedTime

MonadIO m => MonadTime (RealTimeT m) Source # 
Instance details

Defined in Control.Monad.Trans.SimulatedTime