Lines Matching refs:tp2
21 static double tp_diff(struct timespec *tp2, struct timespec *tp1) in tp_diff() argument
23 return (tp2->tv_sec - tp1->tv_sec) in tp_diff()
24 + (tp2->tv_nsec - tp1->tv_nsec) * 1e-9; in tp_diff()
34 struct timespec tp1, tp2; in test_ir() local
51 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp2); in test_ir()
52 printf("processing takes %g seconds\n", tp_diff(&tp2, &tp1)); in test_ir()
76 struct timespec tp1, tp2; in test_file() local
95 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp2); in test_file()
97 tp_diff(&tp2, &tp1), frames); in test_file()
110 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp2); in test_file()
112 tp_diff(&tp2, &tp1), frames); in test_file()