31#elif defined(WITH_CONTIKI)
33#elif defined(RIOT_VERSION)
46#define COAP_TICKS_PER_SECOND 1000
58coap_clock_init_impl(
void) {
61#define coap_clock_init coap_clock_init_impl
62#define coap_ticks coap_ticks_impl
74#elif defined(WITH_CONTIKI)
86#define COAP_TICKS_PER_SECOND CLOCK_SECOND
107#elif defined(RIOT_VERSION)
110#define COAP_TICKS_PER_SECOND (XTIMER_HZ)
112#define COAP_TICKS_PER_SECOND (1000000U)
124#ifdef MODULE_ZTIMER64_XTIMER_COMPAT
125 *t = xtimer_now_usec64();
127 *t = xtimer_now_usec();
133 return t / 1000000UL;
136static inline uint64_t
143 return t / 1000000UL;
167#define COAP_TICKS_PER_SECOND ((coap_tick_t)(1000U))
230#define COAP_MAX_DELAY_TICKS (24 * 60 * 60 * COAP_TICKS_PER_SECOND)
coap_tick_t coap_ticks_from_rt_us(uint64_t t)
Helper function that converts POSIX wallclock time in us to coap ticks.
int64_t coap_tick_diff_t
This data type is used to represent the difference between two clock_tick_t values.
void coap_ticks(coap_tick_t *t)
Sets t to the internal time with COAP_TICKS_PER_SECOND resolution.
time_t coap_time_t
CoAP time in seconds since epoch.
void coap_clock_init(void)
Initializes the internal clock.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
COAP_STATIC_INLINE 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.
coap_time_t coap_ticks_to_rt(coap_tick_t t)
Helper function that converts coap ticks to wallclock time.
COAP_STATIC_INLINE 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.
#define COAP_TICKS_PER_SECOND
Use ms resolution on POSIX systems.
uint64_t coap_ticks_to_rt_us(coap_tick_t t)
Helper function that converts coap ticks to POSIX wallclock time in us.
#define COAP_STATIC_INLINE