1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 11:47:46 +00:00

Add Linux support for TickCount()

This commit is contained in:
redstrate 2021-11-09 20:59:39 -05:00
parent 89c03defdd
commit d032c5d12a

View file

@ -69,6 +69,16 @@ uint32_t TickCount() {
}
#endif
#if defined(Q_OS_LINUX)
uint32_t TickCount() {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
}
#endif
#if defined(Q_OS_WIN)
uint32_t TickCount() {
return GetTickCount();