From f291d2d6dd38ce33dea9155fc2114b57d93c9b52 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Wed, 19 Apr 2017 18:31:21 +0100 Subject: [PATCH] Get full resolution for node_time (#555) --- collector/time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/time.go b/collector/time.go index e6f44d75..76c35b84 100644 --- a/collector/time.go +++ b/collector/time.go @@ -43,7 +43,7 @@ func NewTimeCollector() (Collector, error) { } func (c *timeCollector) Update(ch chan<- prometheus.Metric) error { - now := float64(time.Now().Unix()) + now := float64(time.Now().UnixNano()) / 1e9 log.Debugf("Return time: %f", now) ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, now) return nil