mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 14:39:03 +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:
parent
4091d00057
commit
2ce9e540da
1 changed files with 3 additions and 1 deletions
|
@ -249,8 +249,10 @@ double
|
||||||
psTimer(void)
|
psTimer(void)
|
||||||
{
|
{
|
||||||
struct timespec start;
|
struct timespec start;
|
||||||
#ifdef __linux__
|
#if defined(CLOCK_MONOTONIC_RAW)
|
||||||
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
|
||||||
|
#elif defined(CLOCK_MONOTONIC_FAST)
|
||||||
|
clock_gettime(CLOCK_MONOTONIC_FAST, &start);
|
||||||
#else
|
#else
|
||||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue