logo
pub struct SystemClock(_);
Expand description

A reference to a system clock, useful for talking to external entities like the file system or other processes.

This does not directly correspond to anything in std, however its methods correspond to methods in std::time::SystemTime.

Implementations

An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.

This corresponds to std::time::SystemTime::UNIX_EPOCH.

Constructs a new instance of Self.

Ambient Authority

This uses ambient authority to accesses clocks.

Returns an instant corresponding to “now”.

This corresponds to std::time::SystemTime::now.

Returns the amount of time elapsed since this instant was created.

This corresponds to std::time::SystemTime::elapsed.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.