summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-07-27 15:13:20 -0700
committerGary E. Miller <gem@rellim.com>2016-07-27 15:13:20 -0700
commit1921de2876c5cb8448d5eeb4bf827e5df1009be3 (patch)
treec792cee7ca725d726a16eaa592a0e4a5dfdcacf0 /contrib
parent5cc13b7c194b6b6dd49925a6eea6a6882feeae9f (diff)
downloadgpsd-1921de2876c5cb8448d5eeb4bf827e5df1009be3.tar.gz
Add header and improve output formatting in ppscheck.c
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ppscheck.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ppscheck.c b/contrib/ppscheck.c
index e6eaa722..9348ac19 100644
--- a/contrib/ppscheck.c
+++ b/contrib/ppscheck.c
@@ -73,6 +73,7 @@ int main(int argc, char *argv[])
return 1;
}
+ (void)fprintf(stdout, "# Seconds nanoSecs Signals\n");
for (;;) {
if (ioctl(fd, TIOCMIWAIT, TIOCM_CD|TIOCM_DSR|TIOCM_RI|TIOCM_CTS) != 0) {
(void)fprintf(stderr,
@@ -85,7 +86,7 @@ int main(int argc, char *argv[])
(void)clock_gettime(CLOCK_REALTIME, &ts);
(void)ioctl(fd, TIOCMGET, &handshakes);
- (void)fprintf(stdout, "%10ld %10ld", ts.tv_sec, ts.tv_nsec);
+ (void)fprintf(stdout, "%10ld %010ld", ts.tv_sec, ts.tv_nsec);
for (sp = hlines;
sp < hlines + sizeof(hlines)/sizeof(hlines[0]);
sp++)