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:
parent
89c03defdd
commit
d032c5d12a
1 changed files with 10 additions and 0 deletions
|
@ -69,6 +69,16 @@ uint32_t TickCount() {
|
||||||
}
|
}
|
||||||
#endif
|
#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)
|
#if defined(Q_OS_WIN)
|
||||||
uint32_t TickCount() {
|
uint32_t TickCount() {
|
||||||
return GetTickCount();
|
return GetTickCount();
|
||||||
|
|
Loading…
Add table
Reference in a new issue