Module util

Source

Macros§

every_n
Execute an expression every n times. For example every_n!(1 + 2, println!("I'm mod 3") will print on the 1st, 4th, and so on calls.

Functions§

convert_bytes
Convert val bytes into a human friendly string
convert_duration
Convert val microseconds into a human friendly string. Largest unit used is seconds.
convert_freq
Convert val Hz into a human friendly string
fold_string
Fold a long string to a fixed size string and keep the front and back
get_belowrc_cmd_section_key
The cmd section key for belowrc
get_belowrc_dump_section_key
The dump section key for belowrc
get_belowrc_filename
Get the belowrc filename.
get_belowrc_view_section_key
The view section key for belowrc
get_prefix
get_system_time
Convert timestamp from seconds since epoch to SystemTime
get_unix_timestamp
Convert timestamp from SystemTime to seconds since epoch
is_cpu_significant
read_kern_file_to_internal_buffer
systemtime_to_datetime
Convert system time to human readable datetime.
timestamp_to_datetime
Convert system timestamp to human readable datetime.