varying-0.1.0.0: Automaton based varying values, event streams and tweening.

Safe HaskellNone
LanguageHaskell2010

Control.Varying.Time

Description

 

Synopsis

Documentation

deltaUTC :: Fractional t => Var IO b t Source

Produces "time" deltas using getCurrentTime and diffUTCTime.

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

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

before :: (Monad m, Num t, Ord t) => t -> Var 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 :: (Monad m, Num t, Ord t) => t -> Var 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.