ScummVM API documentation
clock.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
#ifndef ZVISION_CLOCK_H
23
#define ZVISION_CLOCK_H
24
25
#include "common/types.h"
26
27
class
OSystem
;
28
29
namespace
ZVision
{
30
31
/* Class for handling frame to frame deltaTime while keeping track of time pauses/un-pauses */
32
class
Clock
{
33
public
:
34
Clock
(
OSystem
*system);
35
36
private
:
37
OSystem
*_system;
38
uint32 _lastTime;
39
int32 _deltaTime;
40
uint32 _pausedTime;
41
bool
_paused;
42
43
public
:
48
void
update
();
49
55
uint32
getDeltaTime
()
const
{
56
return
_deltaTime;
57
}
58
64
uint32
getLastMeasuredTime
() {
65
return
_lastTime;
66
}
67
72
void
start
();
73
78
void
stop
();
79
};
80
81
}
// End of namespace ZVision
82
83
#endif
ZVision::Clock::start
void start()
ZVision::Clock
Definition:
clock.h:32
ZVision::Clock::stop
void stop()
ZVision
Definition:
clock.h:29
ZVision::Clock::update
void update()
ZVision::Clock::getDeltaTime
uint32 getDeltaTime() const
Definition:
clock.h:55
OSystem
Definition:
system.h:161
ZVision::Clock::getLastMeasuredTime
uint32 getLastMeasuredTime()
Definition:
clock.h:64
engines
zvision
core
clock.h
Generated on Wed Dec 18 2024 09:09:23 for ScummVM API documentation by
1.8.13