polysemy-conc-0.14.1.1: Polysemy effects for concurrency
Safe HaskellNone
LanguageGHC2021

Polysemy.Conc.Monitor

Description

 
Synopsis

Documentation

clockSkewConfig :: (TimeUnit u1, TimeUnit u2) => u1 -> u2 -> ClockSkewConfig Source #

Smart constructor for ClockSkewConfig that takes arbitrary TimeUnits.

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.