[Git][NTPsec/ntpsec][master] mode 6: add 'tick' to get sys_tick
Gary E. Miller
gitlab at mg.gitlab.com
Thu Jan 26 00:16:25 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
f250fea3 by Gary E. Miller at 2017-01-25T16:15:23-08:00
mode 6: add 'tick' to get sys_tick
Try it: ntpq -c 'rv 0 tick'
- - - - -
1 changed file:
- ntpd/ntp_control.c
Changes:
=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -218,7 +218,8 @@ static const struct ctl_proc control_codes[] = {
#define CS_MRU_OLDEST_AGE 95
#define CS_LEAPSMEARINTV 96
#define CS_LEAPSMEAROFFS 97
-#define CS_MAXCODE CS_LEAPSMEAROFFS
+#define CS_TICK 98
+#define CS_MAXCODE CS_TICK
/*
* Peer variables we understand
@@ -396,7 +397,8 @@ static const struct ctl_var sys_var[] = {
{ CS_MRU_OLDEST_AGE, RO, "mru_oldest_age" }, /* 95 */
{ CS_LEAPSMEARINTV, RO, "leapsmearinterval" }, /* 96 */
{ CS_LEAPSMEAROFFS, RO, "leapsmearoffset" }, /* 97 */
- { 0, EOV, "" } /* 97 */
+ { CS_TICK, RO, "tick" }, /* 98 */
+ { 0, EOV, "" } /* 98 */
};
static struct ctl_var *ext_sys_var = NULL;
@@ -2017,6 +2019,10 @@ ctl_putsys(
case CS_WANDER_THRESH:
ctl_putdbl(sys_var[varid].text, wander_threshold * 1e6);
break;
+ case CS_TICK:
+ /* a.k.a. sys_tick (s), output in ms */
+ ctl_putdbl6(sys_var[varid].text, sys_tick * 1e3);
+ break;
}
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f250fea312ba43583d57e542ed86f4bf6243a054
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170126/1868eace/attachment.html>
More information about the vc
mailing list