blob: 856a0c6722a3c457f7370bce70b6aa3266108ae2 [file] [log] [blame]
package sysutil
import "time"
var btime time.Time
// BootTime returns the time the system was started.
func BootTime() time.Time {
return btime
}
// Uptime returns the duration the system has been up.
func Uptime() time.Duration {
return time.Now().Sub(btime)
}