Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
net_timeout.h File Reference

Network timer with wrap around. More...

#include <string.h>
#include <stdbool.h>
#include <limits.h>
#include <zephyr/types.h>
#include <sys/slist.h>

Go to the source code of this file.

Data Structures

struct  net_timeout
 

Macros

#define NET_TIMEOUT_MAX_VALUE   ((uint32_t)INT32_MAX)
 Divisor used to support ms resolution timeouts. More...
 

Functions

void net_timeout_set (struct net_timeout *timeout, uint32_t lifetime, uint32_t now)
 Configure a network timeout structure. More...
 
int64_t net_timeout_deadline (const struct net_timeout *timeout, int64_t now)
 Return the 64-bit system time at which the timeout will complete. More...
 
uint32_t net_timeout_remaining (const struct net_timeout *timeout, uint32_t now)
 Calculate the remaining time to the timeout in whole seconds. More...
 
uint32_t net_timeout_evaluate (struct net_timeout *timeout, uint32_t now)
 Update state to reflect elapsed time and get new delay. More...
 

Detailed Description

Network timer with wrap around.

Timer that runs longer than about 49 days needs to calculate wraps.