summaryrefslogtreecommitdiff
path: root/ntpshmmon.c
diff options
context:
space:
mode:
Diffstat (limited to 'ntpshmmon.c')
-rw-r--r--ntpshmmon.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ntpshmmon.c b/ntpshmmon.c
index 56f90aa6..ce30cd28 100644
--- a/ntpshmmon.c
+++ b/ntpshmmon.c
@@ -13,14 +13,10 @@
#include "gpsd_config.h"
#include "ntpshm.h"
#include "revision.h"
+#include "timespec.h"
#define NTPSEGMENTS 256 /* NTPx for x any byte */
-/* difference between timespecs in nanoseconds */
-/* int is too small, 32 bit long is too small, avoid floats */
-/* MUST be long long to maintain precision on 32 bit code */
-#define timespec_diff_ns(x, y) (long long)(((x).tv_sec-(y).tv_sec)*1000000000LL+(x).tv_nsec-(y).tv_nsec)
-
static struct shmTime *segments[NTPSEGMENTS + 1];
static struct timespec tick[NTPSEGMENTS + 1];