| Stability | experimental |
|---|---|
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
GHC.Eventlog.Live.Machine.WithStartTime
Description
Synopsis
- data WithStartTime a = WithStartTime {
- value :: !a
- maybeStartTimeUnixNano :: !(Maybe Timestamp)
- setWithStartTime'value :: WithStartTime a -> b -> WithStartTime b
- tryGetTimeUnixNano :: WithStartTime Event -> Maybe Timestamp
- withStartTime :: Process Event (WithStartTime Event)
- withStartTime' :: (a -> EventInfo) -> (a -> Maybe Timestamp -> b) -> Process a b
- dropStartTime :: forall a (m :: Type -> Type). Monad m => MachineT m (Is (WithStartTime a)) a
Documentation
data WithStartTime a Source #
Data decorated with a start time in nanoseconds since the Unix epoch.
Constructors
| WithStartTime | |
Fields
| |
Instances
| Functor WithStartTime Source # | |
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 # | |
Defined in GHC.Eventlog.Live.Machine.WithStartTime Methods showsPrec :: Int -> WithStartTime a -> ShowS # show :: WithStartTime a -> String # showList :: [WithStartTime a] -> ShowS # | |
setWithStartTime'value :: WithStartTime a -> b -> WithStartTime b Source #
Setter for the value of a WithStartTime
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.