Skip to content

Engine → Core → clock.h

steady_clock

Syntax

class CONJURE_API steady_clock final : public clock

Inheritance Hierarchy

clock → steady_clock

Constructors

AccessSignatureDescription
publicsteady_clock();

Destructors

AccessSignatureDescription
public~steady_clock() override;

Variables

AccessNameTypeDefaultDescription
publicSPIN_WINDOW_SECONDSstatic constexpr f640.002How 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.