1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00
Jeff Erbrecht a5ecb9bca5 [host] windows: use millisecond precision for BootTime()
Previously, system uptime is truncated to seconds, and then the
subtraction from `time.Now()` is performed. Because uptime does not roll
over to the next second at the same instant as `time.Now()`, then
`BootTime()` ends up not being precise, and often varies by 1 second.

This commit does the subtraction before truncating to seconds, which
results in a significantly lower chance of variance in `BootTime()`.
2023-01-04 10:42:00 -05:00
..
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2022-12-07 13:14:45 +01:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2022-12-07 13:14:45 +01:00
2021-12-04 22:29:38 +01:00
2022-07-30 00:44:15 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00
2021-12-22 21:54:41 +00:00