OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
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 
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 
24  systemTimerStart = std::chrono::steady_clock::now();
25 }
26 
void systemTimerReset()
Reset the system timer.
Definition: time.cpp:23
Time handling utilities.
Included everywhere.
unsigned long or_time_t
Definition: time.h:11
or_time_t systemTimerGet()
Read the system timer.
Definition: time.cpp:15
static auto systemTimerStart
Definition: time.cpp:13