Engine → Core → clock.h
manual_clock
Syntax
class CONJURE_API manual_clock final : public clock
Inheritance Hierarchy
clock → manual_clock
Constructors
| Access | Signature | Description |
| public | manual_clock(); | |
| public | explicit manual_clock(
f64 startSeconds); | |
Destructors
| Access | Signature | Description |
| public | ~manual_clock() override; | |
Variables
| Access | Name | Type | Default | Description |
| private | mNowSeconds | f64 | 0.0 | |
Functions
Public
advance
void advance(
f64 seconds) noexcept;
Moves the clock forward by the given non-negative amount. Negative and NaN amounts assert and are ignored.
now_seconds
[[nodiscard]] f64 now_seconds() const noexcept override;
The current simulated time.
set
void set(
f64 seconds) noexcept;
Sets the clock to an absolute time; may move it backwards.
sleep_until
void sleep_until(
f64 seconds) override;
Jumps the clock forward to the deadline. A deadline in the past leaves the clock where it is: a manual clock never runs backwards through sleep_until.