Merge pull request #34 from jserv/use-clock_gettime

Use clock_gettime() instead of timespec_get()
This commit is contained in:
Daan 2019-06-24 17:48:46 -07:00 committed by GitHub
commit 460ac23307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -312,10 +312,10 @@ static double mi_clock_now() {
}
#else
#include <time.h>
#ifdef TIME_UTC
#ifdef CLOCK_REALTIME
static double mi_clock_now() {
struct timespec t;
timespec_get(&t, TIME_UTC);
clock_gettime(CLOCK_REALTIME, &t);
return (double)t.tv_sec + (1.0e-9 * (double)t.tv_nsec);
}
#else