49 #include "sys/clock.h" 55 #define LOG_MODULE "coap-timer" 56 #define LOG_LEVEL LOG_LEVEL_NONE 58 PROCESS(coap_timer_process,
"coap timer process");
60 static uint64_t current_time;
68 LOG_DBG(
"remaining %lu msec\n", (
unsigned long)remaining);
78 }
else if(remaining < 1) {
93 ev == PROCESS_EVENT_POLL);
108 static clock_time_t last;
113 diff = (clock_time_t)(now - last);
133 const coap_timer_driver_t coap_timer_default_driver = {
#define PROCESS(name, strname)
Declare a process.
#define PROCESS_BEGIN()
Define the beginning of a process.
#define PROCESS_END()
Define the end of a process.
#define PROCESS_WAIT_EVENT_UNTIL(c)
Wait for an event to be posted to the process, with an extra condition.
uint64_t coap_timer_time_to_next_expiration(void)
Get the time until next CoAP timer expires or 0 if there already exists expired timers that have not ...
#define CLOCK_SECOND
A second, measured in system clock time.
void process_poll(struct process *p)
Request a process to be polled.
Header file for the Contiki process interface.
clock_time_t clock_time(void)
Get the current clock time.
PROCESS_THREAD(cc2538_rf_process, ev, data)
Implementation of the cc2538 RF driver process.
void etimer_set(struct etimer *et, clock_time_t interval)
Set an event timer.
int coap_timer_run(void)
This function must be called periodically by the CoAP timer driver to process any expired CoAP timers...
void process_start(struct process *p, process_data_t data)
Start a process.