W3Flints Clock-Timer

Milestones and bindings

Control as many time-based and status-based events as you need.

W3Flints Clock-Timer allows you to implement some cool features with a few lines of code, calling some critical bindings and checking the milestone queue, if provided.


Use milestones when you need to hook any behavior using an approximate time. Because of the relation between the step option and the accuracy level of any time object, W3Flints Clock-Timer cannot guarantee the puntual execution of a milestone, but it provides a second-to-second check, ensuring the execution of the milestone callback.

The milestone queue is a key-value object, in which the key is a datetime in ANSI format, and the value is a function which receives the device and the instant as parameters.


W3Flints Clock-Timer provides some helpers to create timestamps. Those are very useful to create keys fro the milestone stack and deadlines for timers.


Bindings are a core-level and more accurate method to check the current time and clock status.

A full example

Let's create a timer with some milestones and bindings:






:: .