Lines Matching refs:ts1
43 static double diff_timespec(struct timespec *ts1, struct timespec *ts2)
45 return ts1->tv_sec - ts2->tv_sec + (ts1->tv_nsec - ts2->tv_nsec) / 1e9;
51 struct timespec ts1, ts2, ts3;
55 clock_gettime(CLOCK_MONOTONIC_RAW, &ts1);
59 ts1.tv_sec -= mono_raw_base;
63 delay = diff_timespec(&ts3, &ts1);
70 sample->offset = diff_timespec(&ts2, &ts1);
72 sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9;