about summary refs log tree commit diff
path: root/timex.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2024-07-12 18:59:36 +0200
committerLeah Neukirchen <leah@vuxu.org>2024-07-12 18:59:36 +0200
commita31d6bdec16ef5452e19479f807499dcf53c6dfb (patch)
tree29e7dd7f053ad1afbd13b7db6bc78769a82e3526 /timex.c
parentd2daffcdcd51ecd79e79c0c22f7936f037b637c1 (diff)
downloadnano-exporter-a31d6bdec16ef5452e19479f807499dcf53c6dfb.tar.gz
nano-exporter-a31d6bdec16ef5452e19479f807499dcf53c6dfb.tar.xz
nano-exporter-a31d6bdec16ef5452e19479f807499dcf53c6dfb.zip
timex: also report node_time_seconds
Diffstat (limited to 'timex.c')
-rw-r--r--timex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/timex.c b/timex.c
index 91b8d7a..be46770 100644
--- a/timex.c
+++ b/timex.c
@@ -38,6 +38,8 @@ static void timex_collect(scrape_req *req, void *ctx) {
   scrape_write(req, "node_timex_tai_offset_seconds", 0, (double)buf.tai);
   scrape_write(req, "node_timex_tick_seconds", 0, buf.tick / 1e6);
 
+  scrape_write(req, "node_time_seconds", 0, buf.time.tv_sec + buf.time.tv_usec / 1e6);
+
 #if NTP_PPS
   scrape_write(req, "node_timex_pps_calibraton_total", 0, (double)buf.calcnt);
   scrape_write(req, "node_timex_pps_error_total", 0, (double)buf.errcnt);