232 alignas(64)
std::atomic<uint64_t> deadline_{0};
uint64_t deadline() const noexcept
Returns the stored absolute deadline timestamp.
void set_deadline(int64_t interval) noexcept
Sets the deadline to interval time units from now.
int64_t remaining_time() const noexcept
Returns the time remaining until the deadline.
bool has_expired() const noexcept
Returns true if the current time is past the stored deadline.
void reset() noexcept
Resets the deadline to 0, making the timer invalid again.
DeadlineTimer() noexcept
Default constructor. Creates an invalid (unset) deadline.
Accuracy get_accuracy() const noexcept
Returns the time precision configured for this timer.
ElapsedTimer::Accuracy Accuracy
Time precision. Aliases ElapsedTimer::Accuracy for convenience.
定义 deadline_timer.h:93
bool is_valid() const noexcept
Returns true if the deadline has been explicitly set (non-zero).
void set_deadline_abs(uint64_t abs_deadline) noexcept
Sets an explicit absolute deadline timestamp.
Atomic, high-resolution elapsed-time timer.
定义 elapsed_timer.h:93
Accuracy
Selects the precision (resolution) of the timer values returned.
定义 elapsed_timer.h:106
@ kMilli
Millisecond precision
定义 elapsed_timer.h:107
High-resolution elapsed-time measurement with configurable clock source and precision.
Platform-independent macro definitions for the VLink library.
#define VLINK_EXPORT
定义 macros.h:85