Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

# DiffTime

This is a length of time, as measured by a clock.
Conversion functions such as `fromInteger`

and `realToFrac`

will treat it as seconds.
For example, `(0.010 :: DiffTime)`

corresponds to 10 milliseconds.

It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.

#### Instances

NFData DiffTime | |

Defined in Data.Time.Clock.Internal.DiffTime | |

Data DiffTime | |

Defined in Data.Time.Clock.Internal.DiffTime gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DiffTime -> c DiffTime # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DiffTime # toConstr :: DiffTime -> Constr # dataTypeOf :: DiffTime -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c DiffTime) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DiffTime) # gmapT :: (forall b. Data b => b -> b) -> DiffTime -> DiffTime # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DiffTime -> r # gmapQ :: (forall d. Data d => d -> u) -> DiffTime -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DiffTime -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DiffTime -> m DiffTime # | |

Enum DiffTime | |

Defined in Data.Time.Clock.Internal.DiffTime | |

Num DiffTime | |

Read DiffTime | |

Fractional DiffTime | |

Real DiffTime | |

Defined in Data.Time.Clock.Internal.DiffTime toRational :: DiffTime -> Rational # | |

RealFrac DiffTime | |

Show DiffTime | |

Eq DiffTime | |

Ord DiffTime | |

Defined in Data.Time.Clock.Internal.DiffTime |

# Compact timestamp

timestampMicrosecondsLow32Bits :: Time -> Word32 Source #

This is a slightly peculiar operation: it returns the number of microseconds since an arbitrary epoch, modulo 2^32. This number of microseconds wraps every ~35 minutes.

The purpose is to give a compact timestamp (compact to send over the wire) for measuring time differences on the order of seconds or less.