Time Library
Stof time library ("Time").
Last updated
Was this helpful?
Stof time library ("Time").
Last updated
Was this helpful?
The time library is a part of Stof, however, is separately organized because it is system-dependent and cannot be broadly implemented for all embedded environments.
Returns the current time (in milliseconds) since the .
Returns the current time (in nanoseconds) since the Unix epoch. This is helpful for situations that require more granularity than milliseconds.
Returns the current time (in milliseconds) minus a previous timestamp, or the elapsed time since a call to "Time.now()".
The argument may be in alternative time units to milliseconds (will get converted), however, if the value does not have units, it will be assumed to be milliseconds (float or int).
Returns the current time (in nanoseconds) minus a previous timestamp, or the elapsed time since a call to "Time.now()" or "Time.nowNano()".
The argument may be in alternative time units to nanoseconds (will get converted), however, if the value does not have units, it will be assumed to be nanoseconds (float or int).
Block the current thread for a duration (assumed to be milliseconds if no units).
Block the current thread for a duration (assumed to be nanoseconds if no units). Use this function instead of "sleep" if you need a higher granularity than milliseconds.