#include <chrono>
#include <cstdint>
#include <optional>
Go to the source code of this file.
|
| uint64_t | MonotonicClock::nowUs () |
| int64_t | MonotonicClock::nowMs () |
| template<typename Rep, typename Period> |
| constexpr std::optional< std::chrono::duration< Rep, Period > > | MonotonicClock::age (std::chrono::duration< Rep, Period > timestamp, std::chrono::duration< Rep, Period > now) |
| | Age of timestamp at now, both in the same unit; empty for a missing or future timestamp.
|
| constexpr std::optional< std::chrono::microseconds > | MonotonicClock::age (uint64_t timestampUs, uint64_t nowUs) |
| constexpr std::chrono::microseconds | MonotonicClock::remaining (uint64_t timestampUs, uint64_t nowUs, std::chrono::microseconds lifetime) |
| | Time left before a receipt reaches lifetime; zero for a missing, future or expired one.
|
| constexpr bool | MonotonicClock::fresh (uint64_t timestampUs, uint64_t nowUs, std::chrono::microseconds lifetime) |
| | Whether a receipt is younger than lifetime.
|
| constexpr bool | MonotonicClock::withinAge (uint64_t timestampUs, uint64_t nowUs, std::chrono::microseconds maximumAge) |
| | Whether a receipt is at most maximumAge old, its limit included.
|