Cogs.Core
Timer.cpp
1#include "Timer.h"
2
3namespace{
4 struct RefPerfTime
5 {
6 RefPerfTime() { ref = Cogs::perfTime(); }
7 Cogs::TimePerf ref;
8 } reference_perf_time;
9 struct RefCurrentTime
10 {
11 RefCurrentTime() { ref = Cogs::currentTime(); }
12 Cogs::Time ref;
13 } reference_current_time;
14};
15
17{
18 return reference_perf_time.ref;
19}
20Cogs::Time Cogs::currentTimeReference()
21{
22 return reference_current_time.ref;
23}
COGSFOUNDATION_API TimePerf perfTime()
High resolution performance timer. Returns an implementation defined absolute timestamp,...
COGSFOUNDATION_API TimePerf perfTimeReference()
Functions that provide a reference time point at the start of the application startup....
Definition: Timer.cpp:16
COGSFOUNDATION_API Time currentTime()
High resolution clock time (NTP / UTC time). Returns an implementation defined absolute timestamp,...