clocked-0.4.1.2: timer functionality to clock IO commands

Safe Haskell | None

Clocked

Synopsis

- data Timer
- withTimer :: MonadCatchIO m => (Timer -> m a) -> m a
- waitTimer :: Timer -> Double -> IO ()
- getTimeDouble :: IO Double

# Documentation

data Timer Source

withTimer :: MonadCatchIO m => (Timer -> m a) -> m aSource

Run a monadic action with a `Timer`.

waitTimer :: Timer -> Double -> IO ()Source

Waits the given amount of seconds minus the elapsed time since the last call to `waitTimer` (or the initialisation of the timer).

getTimeDouble :: IO Double Source

returns a monotonic time in seconds