Time
Library for accessing the current time.
Available Functions
now()
Get the current time as a Unix timestamp in milliseconds (the number of milliseconds since January 1, 1970 UTC). This is equivalent to Date.now() in JavaScript.
Usage
core.time.now();
Arguments
None.
Returns
[number] the current time, in milliseconds since the Unix epoch
Example
Here we describe a calculation which returns the age, in seconds, of a timestamp stored in a lastSeen variable (in milliseconds):
calculation = (core.time.now() - lastSeen) / 1000
Note
The value is returned in milliseconds, not seconds. Divide by1000 when comparing against values in seconds, such as the delay arguments of the Delay library.
Last modified November 2, 2026: BAM-169 core-time (96f5738)