Core::Time

TimeController in Unified Engine

The TimeController class within the Unified Engine serves as the primary mechanism for managing and measuring time. This class allows the engine to keep track of time intervals, delta time between frames, and various other time-related functionalities crucial for game loops and animations.

Initialization & Destruction

Handles the setup and cleanup of the TimeController.

TimeController();
~TimeController();

Time Management

The class keeps track of the delta time between frames and provides functions to manage and retrieve game time.

public:
    float DeltaTime = 0;
    
public:
    void Update();
    float Time();

Timer Functionality

The timer functions provide capabilities for precise measurements of elapsed time for operations, intervals, or game events.

void StartTimer();
float EndTimer();
float ReadTimerValue();

Global Time Access

Unified Engine offers a global access point to the TimeController instance.

extern TimeController Time;

Last updated