// GetBootTime returns the time at which the machine was started, truncated to the nearest second. // It uses /proc/stat first, which is more accurate, and falls back to the less accurate // unix.Sysinfo if /proc/stat failed. func GetBootTime() (time.Time, error) { … } func getBootTimeWithProcStat() (time.Time, error) { … } func getBootTimeWithSysinfo() (time.Time, error) { … }