Skip to content

Engine → Core → clock.h

clock

Syntax

class CONJURE_API clock

Derived Classes

Classes that use this as a base

Constructors

AccessSignatureDescription
publicclock();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
publicvirtual ~clock();

Functions

Public

now_seconds

[[nodiscard]] virtual f64 now_seconds() const noexcept = 0;

Current time in seconds. Never decreases between two calls on the same clock.

sleep_until

virtual void sleep_until(
    f64 seconds) = 0;

Blocks (or, for simulated clocks, advances time) until now_seconds() reaches the given deadline. Returns immediately when the deadline has already passed.