mirror of
				https://github.com/prometheus/node_exporter.git
				synced 2025-08-20 18:33:52 -07:00 
			
		
		
		
	Get full resolution for node_time (#555)
This commit is contained in:
		
							parent
							
								
									2a38b57a2a
								
							
						
					
					
						commit
						f291d2d6dd
					
				|  | @ -43,7 +43,7 @@ func NewTimeCollector() (Collector, error) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *timeCollector) Update(ch chan<- prometheus.Metric) 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) | 	log.Debugf("Return time: %f", now) | ||||||
| 	ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, now) | 	ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, now) | ||||||
| 	return nil | 	return nil | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue