8 clock_gettime(CLOCK_MONOTONIC, &t);
9 return (
static_cast<Cogs::TimePerf
>(t.tv_sec) * 1000000000) + t.tv_nsec;
15 clock_gettime(CLOCK_REALTIME, &t);
16 return (
static_cast<Cogs::TimePerf
>(t.tv_sec) * 1000000000) + t.tv_nsec;
23int64_t Cogs::perfTimeToMilliseconds(TimePerf time)
25 return time / 1000000;
27double Cogs::perfTimeToSeconds(TimePerf time)
29 return time / 1000000000.0;
32int64_t Cogs::currentTimeToMicroseconds(Time time)
36int64_t Cogs::currentTimeToMilliseconds(Time time)
38 return time / 1000000;
40double Cogs::currentTimeToSeconds(Time time)
42 return time / 1000000000.0;
COGSFOUNDATION_API int64_t perfTimeToMicroseconds(TimePerf time)
Convertion functions for timestamps.
COGSFOUNDATION_API TimePerf perfTime()
High resolution performance timer. Returns an implementation defined absolute timestamp,...
COGSFOUNDATION_API Time currentTime()
High resolution clock time (NTP / UTC time). Returns an implementation defined absolute timestamp,...