diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-24 13:24:42 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-24 13:24:42 -0500 |
commit | e0beddef34daa0690acd468ac6480c5df3bd9d0f (patch) | |
tree | 73865c3ab1753a4d76ba19b5313f7c59430a397b /monitor_nmea0183.c | |
parent | 0fdf858fa62cdd419dd31dacdb122f9d7b04b29b (diff) | |
download | gpsd-e0beddef34daa0690acd468ac6480c5df3bd9d0f.tar.gz |
gpsmon: refactoring step, make utility function for TOS display.
Diffstat (limited to 'monitor_nmea0183.c')
-rw-r--r-- | monitor_nmea0183.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/monitor_nmea0183.c b/monitor_nmea0183.c index 39eae9d7..8ba58882 100644 --- a/monitor_nmea0183.c +++ b/monitor_nmea0183.c @@ -320,25 +320,7 @@ static void nmea_update(void) } #ifdef NTP_ENABLE - /*@-compdef@*/ - /*@-type -noeffect@*/ /* splint is confused about struct timespec */ - if (time_offset.real.tv_sec != 0) - { - /* NOTE: can not use double here due to precision requirements */ - struct timespec timedelta; - TS_SUB(&timedelta, &time_offset.clock, &time_offset.real); - if ( 86400 < (long)labs(timedelta.tv_sec) ) { - /* more than one day off, overflow */ - /* need a bigger field to show it */ - (void)mvwprintw(gpgsawin, TOFF_LINE, 7, "> 1 day"); - } else { - char buf[TIMESPEC_LEN]; - timespec_str( &timedelta, buf, sizeof(buf) ); - (void)mvwprintw(gpgsawin, TOFF_LINE, 7, "%s", buf); - } - } - /*@+type +noeffect@*/ - /*@+compdef@*/ + toff_update(gpgsawin, TOFF_LINE, 7); #endif /* NTP_ENABLE */ if (strcmp(fields[0], "GPGGA") == 0 |