Class Instant

#include <Instant.hpp>
classInstant{ ... }
No description provided
Examples0
Public static methods3
staticasp::time::Instantnow()
No description provided
staticasp::time::InstantfarFuture()

Returns an instant representing the far future, likely never to be reached.

staticasp::time::InstantfromRawNanos()
No description provided
Public member functions17
asp::time::Instant&operator=()
No description provided
asp::time::Instant&operator=()
No description provided
asp::time::DurationdurationSince()const

Returns how much time has passed since other until this instant. If other is in the future, the duration will be zero.

asp::time::Durationelapsed()const

Returns how much time has passed since this instant. If the instant is in the future, the duration will be zero.

asp::time::Durationuntil()const

Returns how much time is left until this instant. If the instant is in the past, the duration will be zero.

std::optional<asp::time::Instant>checkedAdd()const

Adds the given duration to this instant, returning std::nullopt on overflow.

std::optional<asp::time::Instant>checkedSub()const

Subtracts the given duration from this instant, returning std::nullopt on overflow.

asp::time::DurationabsDiff()const

Returns the absolute difference between this instant and another instant.

asp::time::InstantsaturatingAdd()const

Adds the given duration to this instant, returning farFuture() on overflow.

asp::time::InstantsaturatingSub()const

Subtracts the given duration from this instant, returning Instant() on overflow.

asp::time::Instantoperator+()const

Shorthand for saturatingAdd(), adds the given duration to this instant, returning farFuture() on overflow.

asp::time::Instantoperator-()const

Shorthand for saturatingSub(), subtracts the given duration from this instant, returning Instant() on overflow.

asp::time::Instant&operator+=()
No description provided
asp::time::Instant&operator-=()
No description provided
std::strong_orderingoperator<=>()const
No description provided
booloperator==()const
No description provided
asp::nums::i64rawNanos()const
No description provided
Fields0
Protected member functions0
Protected fields0
Derived classes0