Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Use CLOCK_MONOTONIC_FAST when available (FreeBSD)
CLOCK_MONOTONIC_FAST is the equivalent of Linux's CLOCK_MONOTONIC_RAW.
  • Loading branch information
unrelentingtech committed Sep 28, 2020
1 parent 7d31b70 commit 7d03a6fe291ff72edcf517dda1de8aee40941019
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/skel/glfw/glfw.cpp
@@ -235,8 +235,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

0 comments on commit 7d03a6f

Please sign in to comment.