Lines Matching refs:tstamp
58 void timestamp_now(timestamp_t *tstamp) in timestamp_now() argument
60 if (clock_gettime(CLOCK_MONOTONIC_RAW, tstamp)) in timestamp_now()
64 long long timestamp_diff_ms(timestamp_t *tstamp) in timestamp_diff_ms() argument
68 if (tstamp->tv_nsec > now.tv_nsec) { in timestamp_diff_ms()
69 diff.tv_sec = now.tv_sec - tstamp->tv_sec - 1; in timestamp_diff_ms()
70 diff.tv_nsec = (now.tv_nsec + 1000000000L) - tstamp->tv_nsec; in timestamp_diff_ms()
72 diff.tv_sec = now.tv_sec - tstamp->tv_sec; in timestamp_diff_ms()
73 diff.tv_nsec = now.tv_nsec - tstamp->tv_nsec; in timestamp_diff_ms()
275 timestamp_t tstamp; in test_pcm_time() local
446 timestamp_now(&tstamp); in test_pcm_time()
476 ms = timestamp_diff_ms(&tstamp); in test_pcm_time()