Precision Time Protocol time specification.
More...
Precision Time Protocol time specification.
◆ net_ptp_time_to_ns()
#include <include/zephyr/net/ptp_time.h>
Convert a PTP timestamp to a nanosecond precision timestamp, both related to the local network reference clock.
- Note
- Only timestamps representing up to ~290 years can be converted to nanosecond timestamps. Larger timestamps will return the maximum representable nanosecond precision timestamp.
- Parameters
-
- Returns
- the corresponding nanosecond precision timestamp
◆ ns_to_net_ptp_time()
#include <include/zephyr/net/ptp_time.h>
Convert a nanosecond precision timestamp to a PTP timestamp, both related to the local network reference clock.
- Parameters
-
nsec | a nanosecond precision timestamp |
- Returns
- the corresponding PTP timestamp