mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-12 10:37:02 +00:00
14 lines
No EOL
288 B
C++
14 lines
No EOL
288 B
C++
#include <cstdint>
|
|
#include <ctime>
|
|
|
|
uint32_t GetTickCount()
|
|
{
|
|
#if BOOST_OS_LINUX
|
|
struct timespec ts;
|
|
clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
|
|
return (1000 * ts.tv_sec + ts.tv_nsec / 1000000);
|
|
#elif BOOST_OS_MACOS
|
|
return clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW) / 1000000;
|
|
#endif
|
|
|
|
} |