TinyTick logoTinyTick

TimestampMs

The TimestampMs type is a simple alias for a number.

number

It is used to indicate that the number should be considered to be a timestamp in 'milliseconds since the start of 1970'.

Some parts of the API will accept a number typed as either a TimestampMs or a DurationMs. The heuristic to disambiguate them is that a number less than the number of milliseconds in a year (31536000000) is considered a DurationMs duration, and a number larger than that is considered a TimestampMs timestamp.

In other words, it is not expected that TinyTick will be used to schedule things for more than a year in the future (or for absolute times during 1970).

Since

v1.0.0