Searched refs:SHR_FP (Results 1 – 2 of 2) sorted by relevance
81 #define SHR_FP(val,frac) (((coap_tick_t)((val) + (1 << ((frac) - 1)))) >> (frac)) macro96 tmp = SHR_FP(tv.tv_nsec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000000.0)), FRAC); in coap_ticks()108 tmp = SHR_FP(tv.tv_usec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000.0)), FRAC); in coap_ticks()133 #undef SHR_FP
895 #define SHR_FP(val,frac) (((val) + (1 << ((frac) - 1))) >> (frac)) in coap_calc_timeout() macro899 result = SHR_FP((ACK_RANDOM_FACTOR - FP1) * r, MAX_BITS); in coap_calc_timeout()903 result = SHR_FP(((result + FP1) * ACK_TIMEOUT), FRAC_BITS); in coap_calc_timeout()907 return SHR_FP((COAP_TICKS_PER_SECOND * result), FRAC_BITS); in coap_calc_timeout()910 #undef SHR_FP in coap_calc_timeout()