-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
This should return another Utc
. This will be needed to support loops over time, such as:
let mut current = Utc::new(/*...*/);
let end = Utc::new(/*...*/);
while current < end {
/* do stuff */
current += std::time::Duration(1, 0) // Or current += 1*SECOND
}
Eventually also include in this PR some short cuts such as:
hifitime::constants::{DAY, HOUR, MINUTE, SECOND, MICROSECOND, NANOSECOND};
Note that these short cut will need to support multiplications with floats and unsigned integers to make it useful. This may require some custom implementation such as hifitime::StdDuration::from_hours()
or hifitime::StdDuration::from_seconds(10)
. I am pretty sure I cannot just use hifitime::Duration
since it's re-exported.