mirror of
https://github.com/mrxenginner/reVC.git
synced 2026-10-11 01:38:18 +08:00
Use CLOCK_MONOTONIC_FAST when available (FreeBSD)
CLOCK_MONOTONIC_FAST is the equivalent of Linux's CLOCK_MONOTONIC_RAW.
This commit is contained in:
1 parent
4091d00057
commit
2ce9e540da
1 file changed
+3
-1
@@ -249,8 +249,10 @@ double
|
||||
psTimer(void)
|
||||
{
|
||||
struct timespec start;
|
||||
#ifdef __linux__
|
||||
#if defined(CLOCK_MONOTONIC_RAW)
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||
#elif defined(CLOCK_MONOTONIC_FAST)
|
||||
clock_gettime(CLOCK_MONOTONIC_FAST, &start);
|
||||
#else
|
||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user