Import std.time.clock
Instant
struct
Public Struct Instant Implements Comparable, Hashable, Printable, Defaultable
A reading of the monotonic clock: nanoseconds since a moment of its own, which only means something beside the program's other Instants.
Examples
Local start = Instant.FromNanoseconds(1_000)
Local later = start + 2.Seconds
Expect(later - start == 2.Seconds && start < later)
Expect(Instant.Now().Elapsed >= Duration.Zero())-
Now, as the clock counts it.
-
The Instant that many nanoseconds after the clock's start, for code that gives the time.
-
The clock's reading of 0 nanoseconds.
-
How many nanoseconds after the clock's start it is.
-
How long it's been since it, now.
-
baftera. Past what an Int64 of nanoseconds holds, about 292 years, it overflows as an Int64 does. -
bbeforea. Past what an Int64 of nanoseconds holds, about 292 years, it overflows as an Int64 does. -
How long it is from
btoa. Past what an Int64 of nanoseconds holds, about 292 years, it overflows as an Int64 does. -
Whether
ais beforeb. -
How long after the clock's start it is, like "1h2m3.5s".
Report an issue with this page or with FutureBlitz on GitHub.