fixing calls to clock_gettime