Next: , Previous: , Up: API Reference   [Contents][Index]


4.3 Time

In the context of Sly, time is not the seconds that are passing in the real world, but the virtual clock that is ticking within the game loop. This manual refers to a “tick” as the smallest unit of time. There are a user-defined amount of ticks in a real world second, but by default it is 60.

Sly includes several useful modules for working with time. Coroutines are procedures that can be paused and resumed, agendas are procedure schedulers, and signals built atop both agendas and coroutines to provide a high-level functional reactive programming API.

For most use-cases, the signal module should be used exclusively, but the agenda and coroutine modules are useful for building new high-level abstractions.