streamly-0.6.0: Beautiful Streaming, Concurrent and Reactive Composition

Copyright(c) 2017 Harendra Kumar
LicenseBSD3
Maintainerharendra.kumar@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe
LanguageHaskell2010

Streamly.Time

Description

Deprecated: Please use the "rate" combinator instead of the functions in this module

Time utilities for reactive programming.

Synopsis

Documentation

periodic :: Int -> IO () -> IO () Source #

Run an action forever periodically at the given frequency specified in per second (Hz).

Since: 0.1.0

withClock :: IO Int -> Int -> (Int -> IO ()) -> IO () Source #

Run a computation on every clock tick, the clock runs at the specified frequency. It allows running a computation at high frequency efficiently by maintaining a local clock and adjusting it with the provided base clock at longer intervals. The first argument is a base clock returning some notion of time in microseconds. The second argument is the frequency in per second (Hz). The third argument is the action to run, the action is provided the local time as an argument.

Since: 0.1.0