Commit 3c29df3a authored by Philip Carns's avatar Philip Carns
Browse files

switch from gettimeofday() to clock_gettime()

parent df704044
...@@ -79,9 +79,9 @@ int main(int argc, char **argv) ...@@ -79,9 +79,9 @@ int main(int argc, char **argv)
static double Wtime(void) static double Wtime(void)
{ {
struct timeval t; struct timespec tp;
gettimeofday(&t, NULL); clock_gettime(CLOCK_MONOTONIC, &tp);
return((double)t.tv_sec + (double)(t.tv_usec) / 1000000); return((double)tp.tv_sec + (double)(tp.tv_nsec) / (double)1000000000.0);
} }
static void bench_routine(bake_target_id_t bti, int iterations, int size) static void bench_routine(bake_target_id_t bti, int iterations, int size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment