foundation-0.0.17: Alternative prelude with batteries and no dependencies

License | BSD-style
Maintainer | Foundation maintainers
Safe Haskell | None
Language | Haskell2010

Foundation.Time.Types

Description

An implementation of a timing framework

Synopsis

- newtype NanoSeconds = NanoSeconds Word64
- newtype Seconds = Seconds Word64

# Documentation

newtype NanoSeconds Source #

An amount of nanoseconds

Constructors

NanoSeconds Word64 |

Instances

Bounded NanoSeconds Source # |
Methods minBound :: NanoSeconds # maxBound :: NanoSeconds #
Enum NanoSeconds Source # |
Methods succ :: NanoSeconds -> NanoSeconds # pred :: NanoSeconds -> NanoSeconds # toEnum :: Int -> NanoSeconds # fromEnum :: NanoSeconds -> Int # enumFrom :: NanoSeconds -> [NanoSeconds] # enumFromThen :: NanoSeconds -> NanoSeconds -> [NanoSeconds] # enumFromTo :: NanoSeconds -> NanoSeconds -> [NanoSeconds] # enumFromThenTo :: NanoSeconds -> NanoSeconds -> NanoSeconds -> [NanoSeconds] #
Eq NanoSeconds Source # |
Methods (==) :: NanoSeconds -> NanoSeconds -> Bool # (/=) :: NanoSeconds -> NanoSeconds -> Bool #
Ord NanoSeconds Source # |
Methods compare :: NanoSeconds -> NanoSeconds -> Ordering # (<) :: NanoSeconds -> NanoSeconds -> Bool # (<=) :: NanoSeconds -> NanoSeconds -> Bool # (>) :: NanoSeconds -> NanoSeconds -> Bool # (>=) :: NanoSeconds -> NanoSeconds -> Bool # max :: NanoSeconds -> NanoSeconds -> NanoSeconds # min :: NanoSeconds -> NanoSeconds -> NanoSeconds #
Show NanoSeconds Source # |
Methods showsPrec :: Int -> NanoSeconds -> ShowS # show :: NanoSeconds -> String # showList :: [NanoSeconds] -> ShowS #
PrimType NanoSeconds Source # |

Methods

primSizeInBytes :: Proxy * NanoSeconds -> CountOf Word8 #

primShiftToBytes :: Proxy * NanoSeconds -> Int #

primBaUIndex :: ByteArray# -> Offset NanoSeconds -> NanoSeconds #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> prim NanoSeconds #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset NanoSeconds -> NanoSeconds -> prim () #

primAddrIndex :: Addr# -> Offset NanoSeconds -> NanoSeconds #

primAddrRead :: PrimMonad prim => Addr# -> Offset NanoSeconds -> prim NanoSeconds #

primAddrWrite :: PrimMonad prim => Addr# -> Offset NanoSeconds -> NanoSeconds -> prim () #

Additive NanoSeconds Source # |
Methods azero :: NanoSeconds # (+) :: NanoSeconds -> NanoSeconds -> NanoSeconds # scale :: IsNatural n => n -> NanoSeconds -> NanoSeconds #

newtype Seconds Source #

An amount of nanoseconds

Constructors

Seconds Word64 |

Instances

Bounded Seconds Source # |
Methods minBound :: Seconds # maxBound :: Seconds #
Enum Seconds Source # |
Methods succ :: Seconds -> Seconds # pred :: Seconds -> Seconds # toEnum :: Int -> Seconds # fromEnum :: Seconds -> Int # enumFrom :: Seconds -> [Seconds] # enumFromThen :: Seconds -> Seconds -> [Seconds] # enumFromTo :: Seconds -> Seconds -> [Seconds] # enumFromThenTo :: Seconds -> Seconds -> Seconds -> [Seconds] #
Eq Seconds Source # |
Methods (==) :: Seconds -> Seconds -> Bool # (/=) :: Seconds -> Seconds -> Bool #
Ord Seconds Source # |
Methods compare :: Seconds -> Seconds -> Ordering # (<) :: Seconds -> Seconds -> Bool # (<=) :: Seconds -> Seconds -> Bool # (>) :: Seconds -> Seconds -> Bool # (>=) :: Seconds -> Seconds -> Bool # max :: Seconds -> Seconds -> Seconds # min :: Seconds -> Seconds -> Seconds #
Show Seconds Source # |
Methods showsPrec :: Int -> Seconds -> ShowS # show :: Seconds -> String # showList :: [Seconds] -> ShowS #
PrimType Seconds Source # |

Methods

primSizeInBytes :: Proxy * Seconds -> CountOf Word8 #

primShiftToBytes :: Proxy * Seconds -> Int #

primBaUIndex :: ByteArray# -> Offset Seconds -> Seconds #

primMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> prim Seconds #

primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Seconds -> Seconds -> prim () #

primAddrIndex :: Addr# -> Offset Seconds -> Seconds #

primAddrRead :: PrimMonad prim => Addr# -> Offset Seconds -> prim Seconds #

primAddrWrite :: PrimMonad prim => Addr# -> Offset Seconds -> Seconds -> prim () #

Additive Seconds Source # |
Methods azero :: Seconds # (+) :: Seconds -> Seconds -> Seconds # scale :: IsNatural n => n -> Seconds -> Seconds #