pub fn toClock(t: Clock.Timestamp, io: Io, clock: Clock) Clock.Timestamp
Resolution is determined by resolution which may be 0 if the clock is unsupported.
resolution
t: Clock.Timestamp
io: Io
clock: Clock
982 983 984 985 986 987 988 989 990 991
pub fn toClock(t: Clock.Timestamp, io: Io, clock: Clock) Clock.Timestamp { if (t.clock == clock) return t; const now_old = t.clock.now(io); const now_new = clock.now(io); const duration = now_old.durationTo(t.raw); return .{ .clock = clock, .raw = now_new.addDuration(duration), }; }
Resolution is determined by
resolutionwhich may be 0 if the clock is unsupported.