mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
commit
704e8f76d8
|
@ -30,9 +30,9 @@ func NewTimeCollector() (Collector, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *timeCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
func (c *timeCollector) Update(ch chan<- prometheus.Metric) (err error) {
|
||||||
now := time.Now()
|
now := float64(time.Now().Unix())
|
||||||
log.Debugf("Set time: %f", now.Unix())
|
log.Debugf("Set time: %f", now)
|
||||||
c.metric.Set(float64(now.Unix()))
|
c.metric.Set(now)
|
||||||
c.metric.Collect(ch)
|
c.metric.Collect(ch)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue