1
0
Fork 0
mirror of https://github.com/halpz/re3.git synced 2024-12-24 17:55:29 +00: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:
Greg V 2020-09-28 04:59:14 +03:00 committed by erorcun
parent 4091d00057
commit 2ce9e540da

View file

@ -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