Lines Matching refs:tv
29 struct timespec tv; in coap_clock_init() local
30 clock_gettime(COAP_CLOCK, &tv); in coap_clock_init()
32 struct timeval tv; in coap_clock_init()
33 gettimeofday(&tv, NULL); in coap_clock_init()
36 coap_clock_offset = tv.tv_sec; in coap_clock_init()
53 struct timespec tv; in coap_ticks() local
54 clock_gettime(COAP_CLOCK, &tv); in coap_ticks()
61 tmp = SHR_FP(tv.tv_nsec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000000.0)), FRAC); in coap_ticks()
65 struct timeval tv; in coap_ticks() local
66 gettimeofday(&tv, NULL); in coap_ticks()
73 tmp = SHR_FP(tv.tv_usec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000.0)), FRAC); in coap_ticks()
78 *t = tmp + (tv.tv_sec - coap_clock_offset) * COAP_TICKS_PER_SECOND; in coap_ticks()