+
+#ifdef HAVE_MONOTONIC_CLOCK
+ if (have_monotonic_clock)
+ {
+ struct timespec monotonic_timer;
+ clock_gettime (CLOCK_MONOTONIC,&monotonic_timer);
+ time_now.tv_sec = monotonic_timer.tv_sec;
+ time_now.tv_usec = monotonic_timer.tv_nsec / 1000;
+ }
+ else
+ /* This else falls through to gettimeofday */
+#endif