Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
net_time.h File Reference

Representation of nanosecond resolution elapsed time and timestamps in the network stack. More...

#include <zephyr/sys_clock.h>

Go to the source code of this file.

Macros

#define NET_TIME_MAX   INT64_MAX
 The largest positive time value that can be represented by net_time_t.
 
#define NET_TIME_MIN   INT64_MIN
 The smallest negative time value that can be represented by net_time_t.
 
#define NET_TIME_SEC_MAX   (NET_TIME_MAX / NSEC_PER_SEC)
 The largest positive number of seconds that can be safely represented by net_time_t.
 
#define NET_TIME_SEC_MIN   (NET_TIME_MIN / NSEC_PER_SEC)
 The smallest negative number of seconds that can be safely represented by net_time_t.
 

Typedefs

typedef int64_t net_time_t
 Any occurrence of net_time_t specifies a concept of nanosecond resolution scalar time span, future (positive) or past (negative) relative time or absolute timestamp referred to some local network uptime reference clock that does not wrap during uptime and is - in a certain, well-defined sense - common to all local network interfaces, sometimes even to remote interfaces on the same network.
 

Detailed Description

Representation of nanosecond resolution elapsed time and timestamps in the network stack.

Inspired by https://github.com/torvalds/linux/blob/master/include/linux/ktime.h and https://github.com/torvalds/linux/blob/master/[tools/]include/linux/time64.h