reflex-dom-0.2: Functional Reactive Web Apps with Reflex

Safe HaskellNone
LanguageHaskell98

Reflex.Dom.Time

Synopsis

Documentation

data TickInfo Source

Constructors

TickInfo 

Fields

_tickInfo_lastUTC :: UTCTime

UTC time immediately after the last tick.

_tickInfo_n :: Integer

Number of time periods since t0

_tickInfo_alreadyElapsed :: NominalDiffTime

Amount of time already elapsed in the current tick period.

tickLossy :: MonadWidget t m => NominalDiffTime -> UTCTime -> m (Event t TickInfo) Source

Special case of tickLossyFrom that uses the post-build event to start the tick thread.

tickLossyFrom Source

Arguments

:: MonadWidget t m 
=> NominalDiffTime 
-> UTCTime 
-> Event t a

Event that starts a tick generation thread. Usually you want this to be something like the result of getPostBuild that only fires once. But there could be uses for starting multiple timer threads.

-> m (Event t TickInfo) 

Send events over time with the given basis time and interval If the system starts running behind, occurrences will be dropped rather than buffered Each occurrence of the resulting event will contain the index of the current interval, with 0 representing the basis time

delay :: MonadWidget t m => NominalDiffTime -> Event t a -> m (Event t a) Source