diff options
-rw-r--r-- | test/vfd_swmr_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/vfd_swmr_common.c b/test/vfd_swmr_common.c index 1c8d7b3..6d4e464 100644 --- a/test/vfd_swmr_common.c +++ b/test/vfd_swmr_common.c @@ -52,7 +52,12 @@ below_speed_limit(struct timespec *last, const struct timespec *ival) HDassert(0 <= last->tv_nsec && last->tv_nsec < 1000000000L); HDassert(0 <= ival->tv_nsec && ival->tv_nsec < 1000000000L); + /* NOTE: timespec_get() is C11. This may need further tweaks. */ +#ifdef H5_HAVE_WIN32_API + if (timespec_get(&now, TIME_UTC) != TIME_UTC) { +#else if (HDclock_gettime(CLOCK_MONOTONIC, &now) == -1) { +#endif HDfprintf(stderr, "%s: clock_gettime", __func__); HDexit(EXIT_FAILURE); } |