diff options
author | Suraj Neupane <suraj@netdata.cloud> | 2022-03-24 12:58:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-24 12:58:11 +0200 |
commit | 06300b1e42ca623e3b54f6dffeddb2506e3a0213 (patch) | |
tree | b453463ce6fd9f580821030f559510d4938dc296 /collectors/timex.plugin | |
parent | 57d6c179c82a21faba20ff0d2995eee31d071935 (diff) |
timex: this plugin enables timex plugin for non-linux systems (#12489)
* timex: this plugin enables timex plugin for non-linux system
* refactoring and fixing PR comments
* move OS specific macros to libnetdata
* Update README.md
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
Diffstat (limited to 'collectors/timex.plugin')
-rw-r--r-- | collectors/timex.plugin/plugin_timex.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/collectors/timex.plugin/plugin_timex.c b/collectors/timex.plugin/plugin_timex.c index 7817323d75..832b5e863b 100644 --- a/collectors/timex.plugin/plugin_timex.c +++ b/collectors/timex.plugin/plugin_timex.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "daemon/common.h" -#include "sys/timex.h" +#include "libnetdata/os.h" #define PLUGIN_TIMEX_NAME "timex.plugin" @@ -44,7 +44,8 @@ void *timex_main(void *ptr) struct timex timex_buf = {}; int sync_state = 0; - sync_state = adjtimex(&timex_buf); + + sync_state = ADJUST_TIMEX(&timex_buf); collected_number divisor = USEC_PER_MS; if (timex_buf.status & STA_NANO) |