change tsc to gettimeofday