From c4f9bfdc441fb0a0d6bfde208cd1f8192bacc880 Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:33:50 +0200 Subject: added FreeBSD support --- src/skel/glfw/glfw.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/skel/glfw/glfw.cpp') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index a1170c61..643a9e64 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -209,7 +209,11 @@ double psTimer(void) { struct timespec start; +#ifdef __linux__ clock_gettime(CLOCK_MONOTONIC_RAW, &start); +#elif __FreeBSD__ + clock_gettime(CLOCK_MONOTONIC, &start); +#endif return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0; } #endif -- cgit v1.2.3 From 8392b9ad2fc578fd42dc9b5fa27a5da175bf92f5 Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Fri, 7 Aug 2020 17:51:43 +0200 Subject: Update glfw.cpp --- src/skel/glfw/glfw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/skel/glfw/glfw.cpp') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 643a9e64..ed442348 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -211,7 +211,7 @@ psTimer(void) struct timespec start; #ifdef __linux__ clock_gettime(CLOCK_MONOTONIC_RAW, &start); -#elif __FreeBSD__ +#else clock_gettime(CLOCK_MONOTONIC, &start); #endif return start.tv_sec * 1000.0 + start.tv_nsec/1000000.0; -- cgit v1.2.3