system: read the boot time from the kernel on every scrape (#2690)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-11 20:47:11 +02:00
committed by GitHub
parent 9869fb12d1
commit be5036dfa8
5 changed files with 139 additions and 30 deletions
-7
View File
@@ -29,7 +29,6 @@ var (
procGetDynamicTimeZoneInformationSys = modkernel32.NewProc("GetDynamicTimeZoneInformation")
procKernelLocalFileTimeToFileTime = modkernel32.NewProc("LocalFileTimeToFileTime")
procGetTickCount = modkernel32.NewProc("GetTickCount64")
procOpenJobObject = modkernel32.NewProc("OpenJobObjectW")
procIsProcessInJob = modkernel32.NewProc("IsProcessInJob")
)
@@ -81,9 +80,3 @@ func LocalFileTimeToFileTime(localFileTime, utcFileTime *windows.Filetime) uint3
return uint32(ret)
}
func GetTickCount64() uint64 {
ret, _, _ := procGetTickCount.Call()
return uint64(ret)
}