ron-0.9: RON

Safe HaskellNone
LanguageHaskell2010

RON.Epoch

Synopsis

Documentation

data EpochClock a Source #

Real epoch clock. Uses kind of global variable to ensure strict monotonicity.

Instances
Monad EpochClock Source # 
Instance details

Defined in RON.Epoch

Methods

(>>=) :: EpochClock a -> (a -> EpochClock b) -> EpochClock b #

(>>) :: EpochClock a -> EpochClock b -> EpochClock b #

return :: a -> EpochClock a #

fail :: String -> EpochClock a #

Functor EpochClock Source # 
Instance details

Defined in RON.Epoch

Methods

fmap :: (a -> b) -> EpochClock a -> EpochClock b #

(<$) :: a -> EpochClock b -> EpochClock a #

Applicative EpochClock Source # 
Instance details

Defined in RON.Epoch

Methods

pure :: a -> EpochClock a #

(<*>) :: EpochClock (a -> b) -> EpochClock a -> EpochClock b #

liftA2 :: (a -> b -> c) -> EpochClock a -> EpochClock b -> EpochClock c #

(*>) :: EpochClock a -> EpochClock b -> EpochClock b #

(<*) :: EpochClock a -> EpochClock b -> EpochClock a #

MonadIO EpochClock Source # 
Instance details

Defined in RON.Epoch

Methods

liftIO :: IO a -> EpochClock a #

ReplicaClock EpochClock Source # 
Instance details

Defined in RON.Epoch

decode :: EpochTime -> UTCTime Source #

Decode date and time from UUID epoch timestamp

getCurrentEpochTime :: IO EpochTime Source #

Get current time in EpochTime format (with 100 ns resolution). Monotonicity is not guaranteed.

localEpochTimeFromUnix :: Word64 -> LocalTime Source #

Convert unix time in hundreds of milliseconds to RFC 4122 time.

runEpochClock :: ReplicaId -> IORef EpochTime -> EpochClock a -> IO a Source #

Run EpochClock action with explicit time variable.

runEpochClockFromCurrentTime :: ReplicaId -> EpochClock a -> IO a Source #

Like runEpochClock, but initialize time variable with current wall time.