The value needs to be shifted to right to get nanoseconds.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 pmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pmc.c b/pmc.c
index 1e569b5..250124d 100644
--- a/pmc.c
+++ b/pmc.c
@@ -68,7 +68,7 @@ static void pmc_show_delay_timing(struct 
slave_delay_timing_record *record,
                IFMT "delayResponseTimestamp     %" PRId64 ".%09u",
                record->sequenceId,
                SHOW_TIMESTAMP(record->delayOriginTimestamp),
-               record->totalCorrectionField << 16,
+               record->totalCorrectionField >> 16,
                SHOW_TIMESTAMP(record->delayResponseTimestamp));
 }
 
@@ -83,7 +83,7 @@ static void pmc_show_rx_sync_timing(struct 
slave_rx_sync_timing_record *record,
                IFMT "syncEventIngressTimestamp  %" PRId64 ".%09u",
                record->sequenceId,
                SHOW_TIMESTAMP(record->syncOriginTimestamp),
-               record->totalCorrectionField << 16,
+               record->totalCorrectionField >> 16,
                record->scaledCumulativeRateOffset,
                SHOW_TIMESTAMP(record->syncEventIngressTimestamp));
 }
-- 
2.26.2



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

Reply via email to