diff --git a/tmv.h b/tmv.h index f4a1a22..9039534 100644 --- a/tmv.h +++ b/tmv.h @@ -20,6 +20,7 @@ #ifndef HAVE_TMV_H #define HAVE_TMV_H +#include #include #include "ddt.h" @@ -160,4 +161,11 @@ static inline tmv_t timestamp_to_tmv(struct timestamp ts) return t; } +static inline tmv_t pct_to_tmv(struct ptp_clock_time pct) +{ + tmv_t t; + t.ns = pct.sec * NS_PER_SEC + pct.nsec; + return t; +} + #endif