mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-02-08 13:45:37 +00:00
[client] check for underflow when checking frame time
This commit is contained in:
parent
4441427943
commit
08062e3fc3
2 changed files with 3 additions and 2 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
B2-rc1-7-gf5da432d38+1
|
B2-rc1-8-g4441427943+1
|
|
@ -168,7 +168,8 @@ static int renderThread(void * unused)
|
||||||
struct timespec end, diff;
|
struct timespec end, diff;
|
||||||
clock_gettime(CLOCK_REALTIME, &end);
|
clock_gettime(CLOCK_REALTIME, &end);
|
||||||
tsDiff(&diff, &time, &end);
|
tsDiff(&diff, &time, &end);
|
||||||
if (diff.tv_sec > 0 || diff.tv_nsec > 1000000000) // 100ms
|
if (diff.tv_sec > 0 || diff.tv_nsec > 1000000000 || // 100ms
|
||||||
|
diff.tv_sec < 0 || diff.tv_nsec < 0) // underflow
|
||||||
clock_gettime(CLOCK_REALTIME, &time);
|
clock_gettime(CLOCK_REALTIME, &time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue