summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2015-02-01 15:07:45 -0800
committerGary E. Miller <gem@rellim.com>2015-02-01 15:07:45 -0800
commitdde1330b6456cd2825965132cf6d413e1807ca58 (patch)
treefc0a24e8773321b0f87279bd210c355ce9ae5f60 /ppsthread.c
parentfe8d37192e35687c5f85e64dec1099cc2a782d58 (diff)
downloadgpsd-dde1330b6456cd2825965132cf6d413e1807ca58.tar.gz
Add comment warning not to use doubles in PPS math.
WARNING! Loss of precision UNIX time to nanoSec precision is 62 significant bits UNIX time to nanoSec precision after 2038 is 63 bits a double is only 53 significant bits. You can not do PPS math with doubles
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ppsthread.c b/ppsthread.c
index 8a1da980..5a18d6d1 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -35,6 +35,13 @@
* the context structure. Then you can call pps_thread_activate() and
* the thread will launch. It is OK to do this before the device is
* open, the thread will wait on that.
+ *
+ * WARNING! Loss of precision
+ * UNIX time to nanoSec precision is 62 significant bits
+ * UNIX time to nanoSec precision after 2038 is 63 bits
+ * a double is only 53 significant bits.
+ *
+ * You can not do PPS math with doubles
*
* This file is Copyright (c) 2013 by the GPSD project. BSD terms
* apply: see the file COPYING in the distribution root for details.