mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-01 08:06:38 +00:00
feat: increase time resolution when possible (collectors: os, system, time) (#2047)
This commit is contained in:
@@ -142,7 +142,7 @@ func (c *Collector) collectWorker() {
|
||||
name, pidString, parentPID, strconv.Itoa(int(processGroupID)), processOwner, cmdLine,
|
||||
)
|
||||
|
||||
startTime := float64(time.Now().Unix() - int64(data.ElapsedTime))
|
||||
startTime := float64(time.Now().UnixMicro())/1e6 - data.ElapsedTime
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.startTimeOld,
|
||||
|
||||
Reference in New Issue
Block a user