190 [[nodiscard]] static uint64_t get_sys_timestamp(
Accuracy accuracy = kMilli,
bool high_resolution = true) noexcept;
203 [[nodiscard]] static uint64_t get_cpu_timestamp(
Accuracy accuracy = kMilli,
bool high_resolution = true) noexcept;
215 [[nodiscard]] static uint64_t get_cpu_active_time(
Accuracy accuracy = kMilli) noexcept;
222 [[nodiscard]]
Method get_method() const noexcept;
229 [[nodiscard]]
Accuracy get_accuracy() const noexcept;
238 void start() noexcept;
246 void stop() noexcept;
258 int64_t restart() noexcept;
265 [[nodiscard]]
bool is_active() const noexcept;
272 [[nodiscard]] int64_t
get() const noexcept;
275 alignas(64) std::atomic<int64_t> start_time_{-1};
276 Method method_{kCpuTimestamp};
277 Accuracy accuracy_{kMilli};
Atomic high-resolution timer with selectable clock source and unit.
Definition: elapsed_timer.h:95
Accuracy
Precision selector for stored and returned time values.
Definition: elapsed_timer.h:108
ElapsedTimer() noexcept
Constructs a timer with default method (kCpuTimestamp) and accuracy (kMilli).
Method
Clock source selector.
Definition: elapsed_timer.h:100
Cross-platform macros for visibility, branch hints, copy prevention, singletons and string helpers.
#define VLINK_EXPORT
Definition: macros.h:81
constexpr std::string_view get() noexcept
Returns the trimmed compile-time identifier for TypeT.
Definition: name_detector.h:603