varying-0.4.0.0: FRP through value streams and monadic splines.

Safe HaskellNone
LanguageHaskell2010

Control.Varying.Time

Description

 

Synopsis

Documentation

deltaUTC :: (MonadIO m, Fractional t) => VarT m b t Source

Produces time deltas using getCurrentTime and diffUTCTime.

delta :: (Num t, Fractional t, Applicative m, Monad m) => m a -> (a -> a -> t) -> VarT m b t Source

Produces time deltas using a monadic computation and a difference function.

before :: (Applicative m, Monad m, Num t, Ord t) => t -> VarT m t (Event ()) Source

Emits events before accumulating t of input dt. Note that as soon as we have accumulated >= t we stop emitting events and there is no guarantee that an event will be emitted at time == t.

after :: (Applicative m, Monad m, Num t, Ord t) => t -> VarT m t (Event ()) Source

Emits events after t input has been accumulated. Note that event emission is not guaranteed to begin exactly at t, only at some small delta after t.