Yampa-0.13.1: Elegant Functional Reactive Programming Language for Hybrid Systems

Copyright (c) Antony Courtney and Henrik Nilsson Yale University 2003 BSD-style (see the LICENSE file in the distribution) ivan.perez@keera.co.uk provisional non-portable (GHC extensions) None Haskell98

FRP.Yampa.Time

Description

SF primitives that producing the current running time.

Time is global for an SF, so, every constituent SF will use the same global clock. However, when used in combination with switching, the SF switched into will be started at the time of switching, so any reference to localTime or time from that SF will count using the time of switching as the start time.

Take also into account that, because derivative is the derivative of a signal over time, derivating localTime will always produce the value one (1). If you really, really, really need to know the time delta, and need to abandon the hybrid/FRP abstraction, see iterFrom.

Synopsis

# Documentation

Outputs the time passed since the signal function instance was started.

time :: SF a Time #

Alternative name for localTime.