Providing wrapper types for safely performing panic-free checked arithmetic on instants and durations.
APACHE-2.0 License
Bot releases are visible (Hide)
Make Instant::{duration_since, elapsed, sub}
saturating to follow the upstream change.
Add #[must_use]
to follow upstream changes.
Published by github-actions[bot] about 1 year ago
Published by github-actions[bot] about 1 year ago
const_fn
crate.Published by github-actions[bot] about 2 years ago
Make Duration::new
const function on Rust 1.58+.
Make Duration::is_zero
const function on Rust 1.46+. Previously, this was const function on Rust 1.53+.
Documentation improvements.
Published by github-actions[bot] about 3 years ago
Duration::{ZERO, MAX, is_zero}
methods.Published by github-actions[bot] over 3 years ago
Published by github-actions[bot] almost 4 years ago
Add Duration::{as_secs_f64, as_secs_f32, from_secs_f64, from_secs_f32, mul_f64, mul_f32, div_f64, div_f32}
methods.
They are based on duration_float
feature of the standard library that stabilized on Rust 1.38.
Make Instant::{is_some, is_none, unwrap_or}
const function on Rust 1.46+.
Implement TryFrom
for Instant
and Duration
.
With this change, the minimum required version of easytime
without default features goes up to Rust 1.34.
(The minimum required version of the default feature has not changed.)
Implement PartialEq<std::time::Duration>
and PartialOrd<std::time::Duration>
for Duration
.
Implement PartialEq<std::time::Instant>
and PartialOrd<std::time::Instant>
for Instant
.
Documentation improvements.