Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
clock.hpp File Reference

Fixed-timestep accumulator and monotonic stopwatch. More...

#include <aegis2d/core/export.hpp>
#include <chrono>
#include <cstddef>
#include <cstdint>

Go to the source code of this file.

Classes

class  aegis2d::core::FixedTimestep
 Turns variable frame times into a whole number of fixed simulation steps. More...
 
class  aegis2d::core::Stopwatch
 Measures elapsed time with the monotonic std::chrono::steady_clock. More...
 

Namespaces

namespace  aegis2d
 Root namespace of the engine.
 
namespace  aegis2d::core
 Logging, time, main loop, events and configuration shared by client and server.
 

Typedefs

using aegis2d::core::Duration = std::chrono::nanoseconds
 Duration type used for simulation time (nanoseconds).
 

Functions

constexpr Duration aegis2d::core::step_from_rate (std::uint32_t ticks_per_second) noexcept
 Length of one step for a given update rate.
 

Detailed Description

Fixed-timestep accumulator and monotonic stopwatch.