clock¶
| Type | Class |
| Namespace | conjure::core |
| Include File Path | engine/include/conjure/core/clock.h |
| Source File Path | engine/src/core/time/clock.cpp |
| API ↗ | Time, events and random |
Syntax¶
Derived Classes¶
Classes that use this as a base
Constructors¶
| Access | Signature | Description |
|---|---|---|
| public | clock(); |
Important
Copy constructor and assignment has been deleted.
Destructors¶
| Access | Signature | Description |
|---|---|---|
| public | virtual ~clock(); |
Functions¶
Public¶
now_seconds¶
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¶
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.