eventlog-live-0.2.0.1: Live processing of eventlog data.
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

GHC.Eventlog.Live.Machine.WithStartTime

Description

 
Synopsis

Documentation

data WithStartTime a Source #

Data decorated with a start time in nanoseconds since the Unix epoch.

Constructors

WithStartTime 

Instances

Instances details
Functor WithStartTime Source # 
Instance details

Defined in GHC.Eventlog.Live.Machine.WithStartTime

Methods

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

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

Show a => Show (WithStartTime a) Source # 
Instance details

Defined in GHC.Eventlog.Live.Machine.WithStartTime

tryGetTimeUnixNano :: WithStartTime Event -> Maybe Timestamp Source #

If the event has a start time, return Just the time of the event in nanoseconds since the Unix epoch. Otherwise, return Nothing.

withStartTime :: Process Event (WithStartTime Event) Source #

Wrap every event in WithStartTime. Every event after WallClockTime will have its start time field set to Just the process start time.

This machine swallows the first and only WallClockTime event.

withStartTime' :: (a -> EventInfo) -> (a -> Maybe Timestamp -> b) -> Process a b Source #

Generalised version of withStartTime that can be adapted to work on arbitrary types using a getter and a setter.

dropStartTime :: forall a (m :: Type -> Type). Monad m => MachineT m (Is (WithStartTime a)) a Source #

Drop the WithStartTime wrapper.