Fixed incorrect conversion of units from [us] to [ns] when polling PPS time
from generic master in ts2phc program.

Signed-off-by: Jakub Raczynski <j.raczyn...@elpromaelectronics.com>
---
 ts2phc_generic_pps_source.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ts2phc_generic_pps_source.c b/ts2phc_generic_pps_source.c
index 397031f..9923318 100644
--- a/ts2phc_generic_pps_source.c
+++ b/ts2phc_generic_pps_source.c
@@ -42,7 +42,7 @@ static int ts2phc_generic_pps_source_getppstime(struct 
ts2phc_pps_source *src,
                return -1;
        }
        ts->tv_sec  = ntx.time.tv_sec + ntx.tai;
-       ts->tv_nsec = ntx.time.tv_usec;
+       ts->tv_nsec = ntx.time.tv_usec * 1000;
 
        return 0;
 }
-- 
2.25.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to