Module DA.Time

Data Types

data RelTime

The RelTime type describes a time offset, i.e. relative time.

instance Eq RelTime

instance Ord RelTime

instance Additive RelTime

instance Signed RelTime

instance Show RelTime

Functions

time

: Date -> Int -> Int -> Int -> Time

time d h m s turns given UTC date d and the UTC time (given in hours, minutes, seconds) into a UTC timestamp (Time). Does not handle leap seconds.

pass

: RelTime -> Scenario Time

Pass simulated scenario time by argument

addRelTime

: Time -> RelTime -> Time

Adjusts Time with given time offset.

subTime

: Time -> Time -> RelTime

Returns time offset between two given instants.

wholeDays

: RelTime -> Int

Returns the number of whole days in a time offset. Fraction of time is rounded towards zero.

days

: Int -> RelTime

A number of days in relative time.

hours

: Int -> RelTime

A number of hours in relative time.

minutes

: Int -> RelTime

A number of minutes in relative time.

seconds

: Int -> RelTime

A number of seconds in relative time.

milliseconds

: Int -> RelTime

A number of milliseconds in relative time.

microseconds

: Int -> RelTime

A number of microseconds in relative time.

convertRelTimeToMicroseconds

: RelTime -> Int

Convert RelTime to microseconds Use higher level functions instead of the internal microseconds

convertMicrosecondsToRelTime

: Int -> RelTime

Convert microseconds to RelTime Use higher level functions instead of the internal microseconds