<@U6YPB4SJX> <@UERRZKUVA> is there any reason why ...
# development
h
@average-vr-56795 @dry-policeman-7927 is there any reason why the
Workunit
code uses
std::time::SystemTime
rather than
std::time::Instant
?
w
iirc, instant isn't portable between systems?
h
from https://doc.rust-lang.org/std/time/struct.SystemTime.html, "Distinct from the
Instant
type, this time measurement is not monotonic."
so I think
Instant
is meant to give you a clock that's always monotonic and therefore opaque, and
SystemTime
is a time that has a less opaque relationship to real world time and is therefore not guaranteed to be monotonic
and yeah it makes sense that Instant wouldn't be portable between systems
a
IIRC Zipkin expects a start and end timestamp, not a duration. If we were giving durations, we’d be using `Instant`s 🙂
☝️ 1