summaryrefslogtreecommitdiff
path: root/src/ntp.c
diff options
context:
space:
mode:
authorGrant Erickson <marathon96@gmail.com>2012-07-16 09:48:03 -0700
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-07-17 10:13:40 +0200
commitd00cbbd3b0aa78b2464153681ae37f10a9acaa48 (patch)
tree615d2373562f02f56db77bcc79a203cc3885746d /src/ntp.c
parent98c9a04222d8f808842835f2edd80f61209d392a (diff)
downloadconnman-d00cbbd3b0aa78b2464153681ae37f10a9acaa48.tar.gz
connman-d00cbbd3b0aa78b2464153681ae37f10a9acaa48.tar.bz2
connman-d00cbbd3b0aa78b2464153681ae37f10a9acaa48.zip
ntp: Add mnemonics for common clock precisions
Diffstat (limited to 'src/ntp.c')
-rw-r--r--src/ntp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ntp.c b/src/ntp.c
index e4267ea5..3e907416 100644
--- a/src/ntp.c
+++ b/src/ntp.c
@@ -99,6 +99,13 @@ struct ntp_msg {
#define NTP_FLAGS_VN_DECODE(flags) ((uint8_t)(((flags) >> NTP_FLAG_VN_SHIFT) & NTP_FLAG_VN_MASK))
#define NTP_FLAGS_MD_DECODE(flags) ((uint8_t)(((flags) >> NTP_FLAG_MD_SHIFT) & NTP_FLAG_MD_MASK))
+#define NTP_PRECISION_S 0
+#define NTP_PRECISION_DS -3
+#define NTP_PRECISION_CS -6
+#define NTP_PRECISION_MS -9
+#define NTP_PRECISION_US -19
+#define NTP_PRECISION_NS -29
+
static guint channel_watch = 0;
static struct timeval transmit_timeval;
static int transmit_fd = 0;