Use clock_gettime() when available to get monotonic time