Searched refs:tv2 (Results 1 – 3 of 3) sorted by relevance
31 static void tv_sub(struct timeval *tv2, struct timeval *tv1) { in tv_sub() argument32 tv2->tv_sec -= tv1->tv_sec; in tv_sub()33 tv2->tv_usec -= tv1->tv_usec; in tv_sub()34 while (tv2->tv_usec < 0) { in tv_sub()35 tv2->tv_usec += 1000000; in tv_sub()36 tv2->tv_sec -= 1; in tv_sub()42 struct timeval tv2; in do_sleep() local47 gettimeofday(&tv2, NULL); in do_sleep()49 tv_sub(&tv2, &tv1); in do_sleep()51 printf("sleep(%d) took %ld.%06ld seconds\n", delay, tv2.tv_sec, tv2.tv_usec); in do_sleep()[all …]
27 struct timeval tv2; in main() local34 gettimeofday(&tv2, NULL); in main()36 long usec = (tv2.tv_sec - tv1.tv_sec) * 1000000 + tv2.tv_usec - tv1.tv_usec; in main()
47 struct timespec tv, tv2; variable