Skip to content

Commit

Permalink
Merge pull request microsoft#34 from jserv/use-clock_gettime
Browse files Browse the repository at this point in the history
Use clock_gettime() instead of timespec_get()
  • Loading branch information
daanx authored Jun 25, 2019
2 parents 9122269 + 855e2f0 commit 460ac23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 460ac23

Please sign in to comment.