libcoap 4.3.5-develop-490e4e0
|
Clock handling functions. More...
#include "coap3/coap_libcoap_build.h"
Go to the source code of this file.
Macros | |
#define | Q(frac, fval) ((1 << (frac)) * (fval)) |
#define | FRAC 10 |
#define | SHR_FP(val, frac) (((coap_tick_t)((val) + (1 << ((frac) - 1)))) >> (frac)) |
Functions | |
void | coap_clock_init (void) |
Initializes the internal clock. | |
void | coap_ticks (coap_tick_t *t) |
Returns the current value of an internal tick counter. | |
coap_time_t | coap_ticks_to_rt (coap_tick_t t) |
Helper function that converts coap ticks to wallclock time. | |
uint64_t | coap_ticks_to_rt_us (coap_tick_t t) |
Helper function that converts coap ticks to POSIX wallclock time in us. | |
coap_tick_t | coap_ticks_from_rt_us (uint64_t t) |
Helper function that converts POSIX wallclock time in us to coap ticks. | |
Variables | |
static coap_tick_t | coap_clock_offset = 0 |
Clock handling functions.
Definition in file coap_time.c.
#define FRAC 10 |
Definition at line 84 of file coap_time.c.
#define Q | ( | frac, | |
fval | |||
) | ((1 << (frac)) * (fval)) |
Definition at line 81 of file coap_time.c.
#define SHR_FP | ( | val, | |
frac | |||
) | (((coap_tick_t)((val) + (1 << ((frac) - 1)))) >> (frac)) |
Definition at line 87 of file coap_time.c.
|
static |
Definition at line 37 of file coap_time.c.