24#ifndef STELLARLIB_APP_CLOCK_HPP
25#define STELLARLIB_APP_CLOCK_HPP
27#include <stellarlib/app/lifecycle.hpp>
39friend internal::lifecycle<class context>;
73 constexpr auto operator=(const
clock &) noexcept
79 constexpr auto operator=(
clock &&) noexcept
auto delta() const -> float
Returns the elapsed time in seconds between the previous and current scene updates.
constexpr clock(const clock &) noexcept=delete
Deleted copy constructor.
auto frame() const -> float
Returns the elapsed time in seconds between context initialization and the last scene update.
constexpr clock(clock &&) noexcept=delete
Deleted move constructor.
void set_max_delta(float max_delta)
Sets the maximum allowed delta time in seconds [0.0F, +INF).
auto target_frequency() const -> float
Returns the target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
auto max_delta() const -> float
Returns the maximum allowed delta time in seconds [0.0F, +INF).
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 now() const -> float
Returns the elapsed time in seconds since context initialization.
Application runtime.
Definition clock.hpp:33
context::info info
Main initialization descriptor.
Definition init.hpp:41
Clock initialization descriptor.
Definition clock.hpp:46
float target_frequency
Target scene update frequency in hertz [0.0F, +INF) (0.0F means as fast as possible).
Definition clock.hpp:50
float max_delta
Maximum allowed delta time in seconds [0.0F, +INF).
Definition clock.hpp:55