aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ptp/testptp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Documentation/ptp/testptp.c b/Documentation/ptp/testptp.c
index 13bddd5427bd..f1ac2dae999e 100644
--- a/Documentation/ptp/testptp.c
+++ b/Documentation/ptp/testptp.c
@@ -19,6 +19,7 @@
19 */ 19 */
20#include <errno.h> 20#include <errno.h>
21#include <fcntl.h> 21#include <fcntl.h>
22#include <inttypes.h>
22#include <math.h> 23#include <math.h>
23#include <signal.h> 24#include <signal.h>
24#include <stdio.h> 25#include <stdio.h>
@@ -496,14 +497,14 @@ int main(int argc, char *argv[])
496 interval = t2 - t1; 497 interval = t2 - t1;
497 offset = (t2 + t1) / 2 - tp; 498 offset = (t2 + t1) / 2 - tp;
498 499
499 printf("system time: %ld.%ld\n", 500 printf("system time: %" PRId64 ".%u\n",
500 (pct+2*i)->sec, (pct+2*i)->nsec); 501 (pct+2*i)->sec, (pct+2*i)->nsec);
501 printf("phc time: %ld.%ld\n", 502 printf("phc time: %" PRId64 ".%u\n",
502 (pct+2*i+1)->sec, (pct+2*i+1)->nsec); 503 (pct+2*i+1)->sec, (pct+2*i+1)->nsec);
503 printf("system time: %ld.%ld\n", 504 printf("system time: %" PRId64 ".%u\n",
504 (pct+2*i+2)->sec, (pct+2*i+2)->nsec); 505 (pct+2*i+2)->sec, (pct+2*i+2)->nsec);
505 printf("system/phc clock time offset is %ld ns\n" 506 printf("system/phc clock time offset is %" PRId64 " ns\n"
506 "system clock time delay is %ld ns\n", 507 "system clock time delay is %" PRId64 " ns\n",
507 offset, interval); 508 offset, interval);
508 } 509 }
509 510