Current core options for getting numeric timestamps are limited $Ts (time in seconds) and $Tsm (microseconds of the current second).
This leaves no way to calculate more precise time deltas. Even trying to combine the two current variables, being the results of two separate calls, they are not
equal, rounding issues non-withstanding.
Attached is a patch that creates a new core variable, $Tsms, which represents the current timestamp in MILLISECONDS. This granularity is sufficient for most applications. If more is precision is needed, this could easily be extended to add another var, $Tsus, which would represent current time in MICROSECONDS.
Log in to post a comment.