Engine → Core → clock.h
steady_clock
Syntax
class CONJURE_API steady_clock final : public clock
Inheritance Hierarchy
clock → steady_clock
Constructors
| Access | Signature | Description |
| public | steady_clock(); | |
Destructors
| Access | Signature | Description |
| public | ~steady_clock() override; | |
Variables
| Access | Name | Type | Default | Description |
| public | SPIN_WINDOW_SECONDS | static constexpr f64 | 0.002 | How close to the deadline the thread stops sleeping and starts spinning. |
Functions
Public
now_seconds
[[nodiscard]] f64 now_seconds() const noexcept override;
Seconds since the process-wide steady epoch.
sleep_until
void sleep_until(
f64 seconds) override;
Sleeps the calling thread until 2 ms before the deadline, then spins on the clock so the wake-up lands within the scheduler jitter of the deadline. Deadlines may be arbitrarily far away (even infinite): the sleep is taken in bounded steps.