15#ifndef ZEPHYR_INCLUDE_NET_PTP_TIME_H_
16#define ZEPHYR_INCLUDE_NET_PTP_TIME_H_
117#ifdef CONFIG_LITTLE_ENDIAN
160#ifdef CONFIG_LITTLE_ENDIAN
181#ifdef CONFIG_LITTLE_ENDIAN
235 __ASSERT_NO_MSG(nsec >= 0);
#define NSEC_PER_SEC
number of nanoseconds per second
Definition sys_clock.h:113
#define NET_TIME_MAX
The largest positive time value that can be represented by net_time_t.
Definition net_time.h:106
#define NET_TIME_SEC_MAX
The largest positive number of seconds that can be safely represented by net_time_t.
Definition net_time.h:112
int64_t net_time_t
Any occurrence of net_time_t specifies a concept of nanosecond resolution scalar time span,...
Definition net_time.h:103
static net_time_t net_ptp_time_to_ns(struct net_ptp_time *ts)
Convert a PTP timestamp to a nanosecond precision timestamp, both related to the local network refere...
Definition ptp_time.h:210
static struct net_ptp_time ns_to_net_ptp_time(net_time_t nsec)
Convert a nanosecond precision timestamp to a PTP timestamp, both related to the local network refere...
Definition ptp_time.h:231
Network core definitions.
Representation of nanosecond resolution elapsed time and timestamps in the network stack.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT64_TYPE__ int64_t
Definition stdint.h:75
Generalized Precision Time Protocol Extended Timestamp format.
Definition ptp_time.h:154
uint64_t fract_nsecond
Fractional nanoseconds value.
Definition ptp_time.h:194
uint64_t second
Second value.
Definition ptp_time.h:173
(Generalized) Precision Time Protocol Timestamp format.
Definition ptp_time.h:111
uint32_t nanosecond
Nanoseconds.
Definition ptp_time.h:134
uint64_t second
Second value.
Definition ptp_time.h:130