-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: BSON
-
None
There's currently not an easy way to calculate the time elapsed between two bson::DateTimes without converting to other types. We should implement subtraction methods to do this; we can likely copy checked_sub, saturating_sub, and impl Sub from OffsetDateTime: https://docs.rs/time/latest/time/struct.OffsetDateTime.html#
Edit: a more accurate analogy would be the checked_duration_since and saturating_duration_since methods in std::time::Instant.