time-machine-0.1.0: A library to mock the current time.

Safe HaskellNone
LanguageHaskell2010

Control.Monad.TimeMachine.Cockpit

Contents

Synopsis

Destinations

Absolute Destinations

the :: UTCTime -> Destination Source #

A piese of the DSL to construct Absolute destinations.

future :: UTCTime Source #

The point of time where Marty McFly arrived back from 1955 by DeLorean.

Zoned Destinations

type Hour = Int Source #

type Month = Int Source #

jan :: DayOfMonth -> Year -> HalfDay -> Hour -> Minute -> Destination Source #

A piese of the DSL to construct Zoned destinations. If the arguments are in the invalid ranges like jan 32 1970 am 12 60, they will be clipped as jan 31 1970 am 11 59.

Reletive Destinations

minutes :: Integer -> Direction -> Destination Source #

A piese of the DSL to construct Relative destinations, which represents an unit of the interval.

data Direction Source #

A piese of the DSL to construct Relative destinations. It represents the direction of a time travel, namely which of going forward or back.

tomorrow :: Destination Source #

An alias of 1 days later.

yesterday :: Destination Source #

An alias of 1 days ago.

Acceleration

Absolute Acceleration

at :: NominalDiffTime -> TimeScaleUnit -> Acceleration Source #

A piese of the DSL to construct Velocity acceleration.

Relative Acceleration

x :: NominalDiffTime -> Acceleration Source #

A piese of the DSL to construct Factor acceleration. For example x 60 makes the current speed of time x60 faster.