Crate hrtime

Source

Functions§

from_sec
Convert the given secs u64 into a readable time format without any leading zeroes or colons, ex: 318 -> "5:18".
from_sec_padded
Much like from_sec, this function will convert the given secs u64 into a readable time format. But unlike from_sec, this function will introduce leading 0’s until it reaches the format "00:00:00"
to_sec
Will attempt to convert the given time string into a u64 of seconds. time must have the hours, minutes, and seconds separated by colons respectively in order for this function to work correctly. Ex: "1:00", "1:00:00", or "2:38".
to_time
Returns the hours, minutes, and seconds respectively that are represented in the given seconds u64.