Instant
struct Instant
A Instant of time.
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
Examples
nv
use std.time.Instant;
let start = Instant.now();
// do something
let duration = start.elapsed();
Methods
operator-:2
pub fn operator-:2(self, b: Instant): Duration
operator-:2
pub fn operator-:2(self, b: Instant): Duration
operator>=:2
pub fn operator>=:2(self, b: Instant): bool
operator>=:2
pub fn operator>=:2(self, b: Instant): bool
operator>:2
pub fn operator>:2(self, b: Instant): bool
operator>:2
pub fn operator>:2(self, b: Instant): bool
operator<=:2
pub fn operator<=:2(self, b: Instant): bool
operator<=:2
pub fn operator<=:2(self, b: Instant): bool
operator<:2
pub fn operator<:2(self, b: Instant): bool
operator<:2
pub fn operator<:2(self, b: Instant): bool
operator!=:2
pub fn operator!=:2(self, b: Instant): bool
operator!=:2
pub fn operator!=:2(self, b: Instant): bool
operator==:2
pub fn operator==:2(self, b: Instant): bool
operator==:2
pub fn operator==:2(self, b: Instant): bool
Returns the amount of time elapsed since this instant.
Returns the amount of time elapsed since this instant.
Returns the amount of time elapsed since this instant.
nv
use std.time.Instant;
let start = Instant.now();
// do something
let duration = start.elapsed();