Safe Haskell | None |
---|---|
Language | GHC2021 |
Polysemy.Conc.Monitor
Description
Synopsis
- data ClockSkewConfig = ClockSkewConfig {}
- clockSkewConfig :: (TimeUnit u1, TimeUnit u2) => u1 -> u2 -> ClockSkewConfig
- monitorClockSkew :: forall t d diff (r :: EffectRow). (Torsor t diff, TimeUnit diff, Members '[AtomicState (Maybe t) :: (Type -> Type) -> Type -> Type, Time t d, Embed IO] r) => ClockSkewConfig -> MonitorCheck r
Documentation
data ClockSkewConfig Source #
Config for monitorClockSkew
.
Constructors
ClockSkewConfig | |
Fields |
Instances
Show ClockSkewConfig Source # | |
Defined in Polysemy.Conc.Monitor Methods showsPrec :: Int -> ClockSkewConfig -> ShowS # show :: ClockSkewConfig -> String # showList :: [ClockSkewConfig] -> ShowS # | |
Default ClockSkewConfig Source # | |
Defined in Polysemy.Conc.Monitor Methods def :: ClockSkewConfig # | |
Eq ClockSkewConfig Source # | |
Defined in Polysemy.Conc.Monitor Methods (==) :: ClockSkewConfig -> ClockSkewConfig -> Bool # (/=) :: ClockSkewConfig -> ClockSkewConfig -> Bool # |
clockSkewConfig :: (TimeUnit u1, TimeUnit u2) => u1 -> u2 -> ClockSkewConfig Source #
Smart constructor for ClockSkewConfig
that takes arbitrary TimeUnit
s.
monitorClockSkew :: forall t d diff (r :: EffectRow). (Torsor t diff, TimeUnit diff, Members '[AtomicState (Maybe t) :: (Type -> Type) -> Type -> Type, Time t d, Embed IO] r) => ClockSkewConfig -> MonitorCheck r Source #
Check for Monitor
that checks every interval
whether the difference between the current
time and the time at the last check is larger than interval
+ tolerance
.
Can be used to detect that the operating system suspended and resumed.