pulse-0.1.0.0: Synchronize actions to a time pulse

Safe HaskellSafe
LanguageHaskell2010

Control.Concurrent.Pulse

Synopsis

Documentation

data Pulse Source #

A heartbeat

newPulse :: DiffTime -> IO Pulse Source #

Create a new pulse that will send a heartbeat every DiffTime seconds

destroyPulse :: Pulse -> IO () Source #

Destroy the pulse. Note that all pending waitForPulse will be left blocked

withPulse :: DiffTime -> (Pulse -> IO a) -> IO a Source #

Automatically calls newPulse and destroyPulse as needed

waitForPulse :: Pulse -> IO () Source #

Block until the next heartbeat is triggered on the Pulse