V-Gears 0
Free Final Fantasy VII engine.
Timer.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 The V-Gears Team
3 *
4 * This file is part of V-Gears
5 *
6 * V-Gears is free software: you can redistribute it and/or modify it under
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, version 3.0 (GPLv3) of the License.
9 *
10 * V-Gears is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#pragma once
17
18#include <OgreSingleton.h>
19
23class Timer : public Ogre::Singleton<Timer>{
24 public:
25
29 Timer();
30
37 float GetSystemTimeTotal();
38
45 float GetSystemTimeDelta();
46
53 float GetGameTimeTotal();
54
61 float GetGameTimeDelta();
62
71 void AddTime(const float time);
72
79 void SetGameTimer(const float timer);
80
88 int GetGameTimer() const;
89
90 private:
91
96
101
106
111
116};
117
The game timer.
Definition: Timer.h:23
void AddTime(const float time)
Adds time to the time.
Definition: Timer.cpp:44
float game_time_total_
The total game time.
Definition: Timer.h:105
float GetGameTimeTotal()
Retrieves the total game time.
Definition: Timer.cpp:40
float GetSystemTimeDelta()
Retrieves the system time difference.
Definition: Timer.cpp:38
float game_timer_
The game timer.
Definition: Timer.h:115
int GetGameTimer() const
Retrieves the game timer.
Definition: Timer.cpp:57
float system_time_delta_
The system time difference.
Definition: Timer.h:100
Timer()
Constructor.
Definition: Timer.cpp:28
float game_time_delta_
The game time difference.
Definition: Timer.h:110
float system_time_total_
The total system time.
Definition: Timer.h:95
float GetSystemTimeTotal()
Retrieves the total system time.
Definition: Timer.cpp:36
void SetGameTimer(const float timer)
Sets the game timer.
Definition: Timer.cpp:55
float GetGameTimeDelta()
Retrieves the game time difference.
Definition: Timer.cpp:42