|
rstd 0.1.0
|
A measurement of a monotonically nondecreasing clock. More...
Public Member Functions | |
| auto | elapsed () const noexcept -> Duration |
| Returns the amount of time elapsed since this instant was created. | |
| auto | duration_since (Instant other) const noexcept -> Duration |
| Returns the amount of time elapsed from another instant to this one. | |
| auto | checked_add (Duration dur) const noexcept -> Option< Instant > |
| Returns Some(instant) if the addition does not overflow, or None otherwise. | |
| auto | checked_sub (Duration dur) const noexcept -> Option< Instant > |
| Returns Some(instant) if the subtraction does not underflow, or None otherwise. | |
Static Public Member Functions | |
| static auto | now () noexcept -> Instant |
| Returns an instant corresponding to "now". | |
A measurement of a monotonically nondecreasing clock.
Returns Some(instant) if the addition does not overflow, or None otherwise.
| dur | The duration to add. |
Returns Some(instant) if the subtraction does not underflow, or None otherwise.
| dur | The duration to subtract. |
Returns the amount of time elapsed from another instant to this one.
| other | The earlier instant. |