https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-breakfast-49010

03/16/2020, 10:12 PM
@average-vr-56795 @dry-policeman-7927 is there any reason why the
Workunit
code uses
std::time::SystemTime
rather than
std::time::Instant
?
w

witty-crayon-22786

03/16/2020, 10:36 PM
iirc, instant isn't portable between systems?
h

hundreds-breakfast-49010

03/16/2020, 10:54 PM
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

average-vr-56795

03/17/2020, 10:09 AM
IIRC Zipkin expects a start and end timestamp, not a duration. If we were giving durations, we’d be using `Instant`s 🙂
☝️ 1