fix bug in clock_gettime