Agda-2.5.2: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Utils.Time

Description

Time-related utilities.

Synopsis

- type ClockTime = UTCTime
- getClockTime :: IO ClockTime
- getCPUTime :: MonadIO m => m CPUTime
- measureTime :: MonadIO m => m a -> m (a, CPUTime)
- newtype CPUTime = CPUTime Integer

# Documentation

type ClockTime = UTCTime #

Timestamps.

getClockTime :: IO ClockTime #

The current time.

getCPUTime :: MonadIO m => m CPUTime #

measureTime :: MonadIO m => m a -> m (a, CPUTime) #

Measure the time of a computation. Of course, does not work with exceptions.

newtype CPUTime #

CPU time in pico (10^-12) seconds.

Constructors

CPUTime Integer |

Instances

Enum CPUTime # |
Methods succ :: CPUTime -> CPUTime # pred :: CPUTime -> CPUTime # toEnum :: Int -> CPUTime # fromEnum :: CPUTime -> Int # enumFrom :: CPUTime -> [CPUTime] # enumFromThen :: CPUTime -> CPUTime -> [CPUTime] # enumFromTo :: CPUTime -> CPUTime -> [CPUTime] # enumFromThenTo :: CPUTime -> CPUTime -> CPUTime -> [CPUTime] #
Eq CPUTime # |
Methods (==) :: CPUTime -> CPUTime -> Bool # (/=) :: CPUTime -> CPUTime -> Bool #
Integral CPUTime # |
Methods quot :: CPUTime -> CPUTime -> CPUTime # rem :: CPUTime -> CPUTime -> CPUTime # div :: CPUTime -> CPUTime -> CPUTime # mod :: CPUTime -> CPUTime -> CPUTime # quotRem :: CPUTime -> CPUTime -> (CPUTime, CPUTime) # divMod :: CPUTime -> CPUTime -> (CPUTime, CPUTime) # toInteger :: CPUTime -> Integer #
Num CPUTime # |
Methods (+) :: CPUTime -> CPUTime -> CPUTime # (-) :: CPUTime -> CPUTime -> CPUTime # (*) :: CPUTime -> CPUTime -> CPUTime # negate :: CPUTime -> CPUTime # abs :: CPUTime -> CPUTime # signum :: CPUTime -> CPUTime # fromInteger :: Integer -> CPUTime #
Ord CPUTime # |
Methods compare :: CPUTime -> CPUTime -> Ordering # (<) :: CPUTime -> CPUTime -> Bool # (<=) :: CPUTime -> CPUTime -> Bool # (>) :: CPUTime -> CPUTime -> Bool # (>=) :: CPUTime -> CPUTime -> Bool # max :: CPUTime -> CPUTime -> CPUTime # min :: CPUTime -> CPUTime -> CPUTime #
Real CPUTime # |
Methods toRational :: CPUTime -> Rational #
Show CPUTime # |
Methods showsPrec :: Int -> CPUTime -> ShowS # show :: CPUTime -> String # showList :: [CPUTime] -> ShowS #
Pretty CPUTime # | Print CPU time in milli (10^-3) seconds.
Methods pretty :: CPUTime -> Doc # prettyPrec :: Int -> CPUTime -> Doc #