mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 17:46:36 +00:00
feat: increase time resolution when possible (collectors: os, system, time) (#2047)
This commit is contained in:
@@ -141,7 +141,7 @@ func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
|
||||
nil,
|
||||
)
|
||||
|
||||
c.bootTimeTimestamp = float64(time.Now().Unix() - int64(kernel32.GetTickCount64()/1000))
|
||||
c.bootTimeTimestamp = float64(uint64(time.Now().UnixMilli())-kernel32.GetTickCount64()) / 1000
|
||||
|
||||
var err error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user