15#ifndef ZEPHYR_INCLUDE_NET_PTP_TIME_H_
16#define ZEPHYR_INCLUDE_NET_PTP_TIME_H_
115#ifdef CONFIG_LITTLE_ENDIAN
158#ifdef CONFIG_LITTLE_ENDIAN
179#ifdef CONFIG_LITTLE_ENDIAN
233 __ASSERT_NO_MSG(nsec >= 0);
#define NSEC_PER_SEC
number of nanoseconds per second
Definition: sys_clock.h:107
#define NET_TIME_MAX
The largest positive time value that can be represented by net_time_t.
Definition: net_time.h:104
#define NET_TIME_SEC_MAX
The largest positive number of seconds that can be safely represented by net_time_t.
Definition: net_time.h:110
int64_t net_time_t
Any occurrence of net_time_t specifies a concept of nanosecond resolution scalar time span,...
Definition: net_time.h:101
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:208
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:229
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:152
uint64_t fract_nsecond
Fractional nanoseconds value.
Definition: ptp_time.h:192
uint64_t second
Second value.
Definition: ptp_time.h:171
(Generalized) Precision Time Protocol Timestamp format.
Definition: ptp_time.h:109
uint32_t nanosecond
Nanoseconds.
Definition: ptp_time.h:132
uint64_t second
Second value.
Definition: ptp_time.h:128