Clock subsystem.
More...
#include <clock.hpp>
|
|
constexpr | clock (const clock &) noexcept=delete |
| | Deleted copy constructor.
|
|
constexpr | clock (clock &&) noexcept=delete |
| | Deleted move constructor.
|
|
constexpr auto | operator= (const clock &) noexcept -> clock &=delete |
| | Deleted copy assignment operator.
|
|
constexpr auto | operator= (clock &&) noexcept -> clock &=delete |
| | Deleted move assignment operator.
|
|
| ~clock () |
| | Destructor.
|
| auto | now () const -> float |
| | Returns the elapsed time in seconds since context initialization.
|
| auto | target_frequency () const -> float |
| | Returns the target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
|
| void | set_target_frequency (float target_frequency) |
| | Sets the target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
|
| auto | frame () const -> float |
| | Returns the elapsed time in seconds between context initialization and the last scene update.
|
| auto | max_delta () const -> float |
| | Returns the maximum allowed delta time in seconds [0.0F, +INF).
|
| void | set_max_delta (float max_delta) |
| | Sets the maximum allowed delta time in seconds [0.0F, +INF).
|
| auto | delta () const -> float |
| | Returns the elapsed time in seconds between the previous and current scene updates.
|
◆ now()
| auto stellarlib::app::clock::now |
( |
| ) |
const -> float |
|
nodiscard |
Returns the elapsed time in seconds since context initialization.
- Returns
- Elapsed time in seconds since context initialization
◆ target_frequency()
| auto stellarlib::app::clock::target_frequency |
( |
| ) |
const -> float |
|
nodiscard |
Returns the target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
- Returns
- Target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible)
◆ set_target_frequency()
| void stellarlib::app::clock::set_target_frequency |
( |
float | target_frequency | ) |
|
Sets the target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
- Parameters
-
| target_frequency | Target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible) |
◆ frame()
| auto stellarlib::app::clock::frame |
( |
| ) |
const -> float |
|
nodiscard |
Returns the elapsed time in seconds between context initialization and the last scene update.
- Returns
- Elapsed time in seconds between context initialization and the last scene update
◆ max_delta()
| auto stellarlib::app::clock::max_delta |
( |
| ) |
const -> float |
|
nodiscard |
Returns the maximum allowed delta time in seconds [0.0F, +INF).
- Returns
- Maximum allowed delta time in seconds [0.0F, +INF)
◆ set_max_delta()
| void stellarlib::app::clock::set_max_delta |
( |
float | max_delta | ) |
|
Sets the maximum allowed delta time in seconds [0.0F, +INF).
- Parameters
-
| max_delta | Maximum allowed delta time in seconds [0.0F, +INF) |
◆ delta()
| auto stellarlib::app::clock::delta |
( |
| ) |
const -> float |
|
nodiscard |
Returns the elapsed time in seconds between the previous and current scene updates.
- Returns
- Elapsed time in seconds between the previous and current scene updates
The documentation for this class was generated from the following file: