rstd 0.1.0
Loading...
Searching...
No Matches
rstd::time::SystemTime Struct Referenceexport
module rstd

A measurement of the system clock, useful for talking to external entities like the filesystem or other processes. More...

Public Member Functions

auto duration_since (SystemTime other) const noexcept -> Result< Duration, Duration >
 Returns the duration since an earlier SystemTime, or an Err if other is later.
 
auto elapsed () const noexcept -> Result< Duration, Duration >
 Returns the elapsed time since this SystemTime was created.
 
auto checked_add (Duration dur) const noexcept -> Option< SystemTime >
 Returns Some(time) if the addition does not overflow, or None otherwise.
 
auto checked_sub (Duration dur) const noexcept -> Option< SystemTime >
 Returns Some(time) if the subtraction does not underflow, or None otherwise.
 

Static Public Member Functions

static auto now () noexcept -> SystemTime
 Returns the system time corresponding to "now".
 

Detailed Description

A measurement of the system clock, useful for talking to external entities like the filesystem or other processes.

Member Function Documentation

◆ checked_add()

auto rstd::time::SystemTime::checked_add ( Duration dur) const -> Option<SystemTime>
inlineexportnoexcept

Returns Some(time) if the addition does not overflow, or None otherwise.

Parameters
durThe duration to add.

◆ checked_sub()

auto rstd::time::SystemTime::checked_sub ( Duration dur) const -> Option<SystemTime>
inlineexportnoexcept

Returns Some(time) if the subtraction does not underflow, or None otherwise.

Parameters
durThe duration to subtract.

◆ duration_since()

auto rstd::time::SystemTime::duration_since ( SystemTime other) const -> Result<Duration, Duration>
inlineexportnoexcept

Returns the duration since an earlier SystemTime, or an Err if other is later.

Parameters
otherThe earlier system time.

The documentation for this struct was generated from the following file: