diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-08 12:48:17 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-08 12:48:17 -0400 |
commit | 5fdd69a308ec9b799424d90de5a4888a25d51558 (patch) | |
tree | 451f5be87b1f9afa58789f74462180e829e3157d /gpsmon.c | |
parent | fc0e032da5ca1c4b1e04a146220909eddebb6b86 (diff) | |
download | gpsd-5fdd69a308ec9b799424d90de5a4888a25d51558.tar.gz |
Fix a display glitch when there is a field after TOFF or PPS...
...but on the same line.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -224,8 +224,10 @@ void toff_update(WINDOW *win, int y, int x) { /* NOTE: can not use double here due to precision requirements */ struct timespec timedelta; + int i; (void)wmove(win, y, x); - (void)wclrtoeol(win); + for (i = 0; i < TIMESPEC_LEN; i++) + (void)waddch(win, ' '); TS_SUB(&timedelta, &time_offset.clock, &time_offset.real); if ( 86400 < (long)labs(timedelta.tv_sec) ) { /* more than one day off, overflow */ @@ -253,8 +255,10 @@ void pps_update(WINDOW *win, int y, int x) if (pps_thread_lastpps(&session.pps_thread, &ppstimes) > 0) { /* NOTE: can not use double here due to precision requirements */ struct timespec timedelta; + int i; (void)wmove(win, y, x); - (void)wclrtoeol(win); + for (i = 0; i < TIMESPEC_LEN; i++) + (void)waddch(win, ' '); TS_SUB( &timedelta, &ppstimes.clock, &ppstimes.real); if ( 86400 < (long)labs(timedelta.tv_sec) ) { /* more than one day off, overflow */ |