Skip to contentSkip to conversation

[5481] FreeBSD also has clock_gettime

Qemu-devel Aurelien Jarno 1 participant 1 message Oct 13, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5481

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5481
Author:   aurel32
Date:     2008-10-13 21:08:25 +0000 (Mon, 13 Oct 2008)

Log Message:
-----------
FreeBSD also has clock_gettime

Modified Paths:
--------------
trunk/vl.c

Modified: trunk/vl.c
===================================================================

vl.c +2 -2
@@ -733,7 +733,7 @@
 static void init_get_clock(void)
 {
     use_rt_clock = 0;
-#if defined(__linux__)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
     {
         struct timespec ts;
         if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
@@ -745,7 +745,7 @@
 
 static int64_t get_clock(void)
 {
-#if defined(__linux__)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
     if (use_rt_clock) {
         struct timespec ts;
         clock_gettime(CLOCK_MONOTONIC, &ts);