OpenRaider
0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
utils
time.cpp
Go to the documentation of this file.
1
8
#include <chrono>
9
10
#include "
global.h
"
11
#include "
utils/time.h
"
12
13
static
auto
systemTimerStart
= std::chrono::steady_clock::now();
14
15
or_time_t
systemTimerGet
() {
16
auto
tp = std::chrono::steady_clock::now();
17
18
return
static_cast<
or_time_t
>
(
19
std::chrono::duration_cast<std::chrono::milliseconds>
20
(tp -
systemTimerStart
).count());
21
}
22
23
void
systemTimerReset
() {
24
systemTimerStart
= std::chrono::steady_clock::now();
25
}
26
systemTimerReset
void systemTimerReset()
Reset the system timer.
Definition:
time.cpp:23
time.h
Time handling utilities.
global.h
Included everywhere.
or_time_t
unsigned long or_time_t
Definition:
time.h:11
systemTimerGet
or_time_t systemTimerGet()
Read the system timer.
Definition:
time.cpp:15
systemTimerStart
static auto systemTimerStart
Definition:
time.cpp:13
Generated by
1.8.9.1