V-Gears 0
Free Final Fantasy VII engine.
Timer Class Reference

The game timer. More...

#include <Timer.h>

Inheritance diagram for Timer:
Collaboration diagram for Timer:

Public Member Functions

 Timer ()
 Constructor. More...
 
float GetSystemTimeTotal ()
 Retrieves the total system time. More...
 
float GetSystemTimeDelta ()
 Retrieves the system time difference. More...
 
float GetGameTimeTotal ()
 Retrieves the total game time. More...
 
float GetGameTimeDelta ()
 Retrieves the game time difference. More...
 
void AddTime (const float time)
 Adds time to the time. More...
 
void SetGameTimer (const float timer)
 Sets the game timer. More...
 
int GetGameTimer () const
 Retrieves the game timer. More...
 

Private Attributes

float system_time_total_
 The total system time. More...
 
float system_time_delta_
 The system time difference. More...
 
float game_time_total_
 The total game time. More...
 
float game_time_delta_
 The game time difference. More...
 
float game_timer_
 The game timer. More...
 

Detailed Description

The game timer.

Constructor & Destructor Documentation

◆ Timer()

Timer::Timer ( )

Constructor.

Member Function Documentation

◆ AddTime()

void Timer::AddTime ( const float  time)

Adds time to the time.

It can also be used to subtract time, but it will never get below 0.

Parameters
[in]timeThe time to add?
Todo:
What are the units? seconds?

◆ GetGameTimeDelta()

float Timer::GetGameTimeDelta ( )

Retrieves the game time difference.

Returns
The game time difference.
Todo:
What is the game time? What's the difference with system time?

◆ GetGameTimer()

int Timer::GetGameTimer ( ) const

Retrieves the game timer.

Returns
The game timer.
Todo:
What is this timer? Why is it an int, but the setter accepts float?

◆ GetGameTimeTotal()

float Timer::GetGameTimeTotal ( )

Retrieves the total game time.

Returns
The total game time.
Todo:
What is the game time? What's the difference with system time?

◆ GetSystemTimeDelta()

float Timer::GetSystemTimeDelta ( )

Retrieves the system time difference.

Returns
The system time difference.
Todo:
What is the system time? What's the difference with game time?

◆ GetSystemTimeTotal()

float Timer::GetSystemTimeTotal ( )

Retrieves the total system time.

Returns
The total system time.
Todo:
What is the system time? What's the difference with game time?

◆ SetGameTimer()

void Timer::SetGameTimer ( const float  timer)

Sets the game timer.

Parameters
[in]timerThe new game timer.
Todo:
Understand and document.

Member Data Documentation

◆ game_time_delta_

float Timer::game_time_delta_
private

The game time difference.

◆ game_time_total_

float Timer::game_time_total_
private

The total game time.

◆ game_timer_

float Timer::game_timer_
private

The game timer.

◆ system_time_delta_

float Timer::system_time_delta_
private

The system time difference.

◆ system_time_total_

float Timer::system_time_total_
private

The total system time.


The documentation for this class was generated from the following files: