Skip to main content

Module time_utils

Module time_utils 

Source
Expand description

Wall-clock time helpers.

The current_* functions query std::time::SystemTime::now and return the elapsed duration since the Unix epoch in the requested unit. The remaining helpers format, parse and align timestamps in the local time zone, following the Java broker’s formats.

Constants§

YYYYMMDDHHMMSS
The yyyymmddhhmmss constant.
YYYY_MM_DD_HH_MM_SS_SSS
The yyyy mm dd hh mm ss sss constant.

Functions§

compute_next_minutes_time_millis
Executes compute next minutes time millis.
compute_next_morning_time_millis
Executes compute next morning time millis.
current_millis
Returns the current Unix timestamp in milliseconds.
current_nano
Returns the current Unix timestamp in nanoseconds.
current_secs
Returns the current Unix timestamp in whole seconds.
is_it_time_to_do
Returns whether the current local hour is one of the ;-separated hours in when, such as a deleteWhen setting of "04;16".
parse_date
Parses date.
parse_date_to_millis
Parses date to millis.
time_millis_to_human_string
Converts a timestamp in milliseconds to a human-readable string format.
time_millis_to_human_string2
Converts a timestamp in milliseconds to a human-readable string format.
time_millis_to_human_string3
Converts a timestamp in milliseconds to a compact human-readable string format.