mirror of https://github.com/shirou/gopsutil
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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()`. |
2 years ago | |
---|---|---|
.. | ||
freebsd_headers | 6 years ago | |
host.go | 2 years ago | |
host_bsd.go | 3 years ago | |
host_darwin.go | 3 years ago | |
host_darwin_amd64.go | 3 years ago | |
host_darwin_arm64.go | 3 years ago | |
host_darwin_cgo.go | 3 years ago | |
host_darwin_nocgo.go | 3 years ago | |
host_fallback.go | 3 years ago | |
host_freebsd.go | 3 years ago | |
host_freebsd_386.go | 6 years ago | |
host_freebsd_amd64.go | 6 years ago | |
host_freebsd_arm.go | 6 years ago | |
host_freebsd_arm64.go | 3 years ago | |
host_linux.go | 2 years ago | |
host_linux_386.go | 3 years ago | |
host_linux_amd64.go | 3 years ago | |
host_linux_arm.go | 3 years ago | |
host_linux_arm64.go | 3 years ago | |
host_linux_mips.go | 3 years ago | |
host_linux_mips64.go | 3 years ago | |
host_linux_mips64le.go | 3 years ago | |
host_linux_mipsle.go | 3 years ago | |
host_linux_ppc64le.go | 3 years ago | |
host_linux_riscv64.go | 3 years ago | |
host_linux_s390x.go | 3 years ago | |
host_linux_test.go | 3 years ago | |
host_openbsd.go | 3 years ago | |
host_openbsd_386.go | 3 years ago | |
host_openbsd_amd64.go | 3 years ago | |
host_openbsd_arm.go | 3 years ago | |
host_openbsd_arm64.go | 3 years ago | |
host_posix.go | 2 years ago | |
host_solaris.go | 3 years ago | |
host_test.go | 3 years ago | |
host_windows.go | 2 years ago | |
smc_darwin.c | 3 years ago | |
smc_darwin.h | 3 years ago | |
types_darwin.go | 3 years ago | |
types_freebsd.go | 3 years ago | |
types_linux.go | 3 years ago | |
types_openbsd.go | 3 years ago |