30 #define COAP_TICKS_PER_SECOND 1000 36 static inline void coap_ticks_impl(
coap_tick_t *t) {
40 static inline void coap_clock_init_impl(
void) {
43 #define coap_clock_init coap_clock_init_impl 44 #define coap_ticks coap_ticks_impl 64 #define COAP_TICKS_PER_SECOND CLOCK_SECOND 99 #define COAP_TICKS_PER_SECOND 1000 void coap_clock_init(void)
Initializes the internal clock.
coap_time_t coap_ticks_to_rt(coap_tick_t t)
Helper function that converts coap ticks to wallclock time.
unsigned long coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
#define COAP_TICKS_PER_SECOND
Use ms resolution on POSIX systems.
long coap_tick_diff_t
This data type is used to represent the difference between two clock_tick_t values.
time_t coap_time_t
CoAP time in seconds since epoch.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
static int coap_time_le(coap_tick_t a, coap_tick_t b)
Returns 1 if and only if a is less than or equal b where less is defined on a signed data type...
static int coap_time_lt(coap_tick_t a, coap_tick_t b)
Returns 1 if and only if a is less than b where less is defined on a signed data type.