diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-03 08:01:59 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-03 08:01:59 -0500 |
commit | 34eaeaeb7af755e07166947de515bc0d04226427 (patch) | |
tree | 0049d3c17d465aca3b3a3034e1de5db95b2191ad /gps.h | |
parent | b684c9278f14f683f1d77e91d04cb040a4de6aa1 (diff) | |
download | gpsd-34eaeaeb7af755e07166947de515bc0d04226427.tar.gz |
Fix up gpsprof's dime difference calculation and add a mtching C macro.
All regression tests pass. PPS is live.
Diffstat (limited to 'gps.h')
-rw-r--r-- | gps.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1891,6 +1891,8 @@ struct timedrift_t { struct timespec real; struct timespec clock; }; +#define TIMEDIFF(drift) ((((drift)->real.tv_sec - (drift)->clock.tv_sec)*1e9)\ + + ((drift)->real.tv_nsec - (drift)->clock.tv_nsec)) /* * Someday we may support Windows, under which socket_t is a separate type. |