Debian Codegraph @

sysutil.go

raw symbols SCIP
1 package sysutil
2
3 import "time"
4
5 var btime time.Time
6
7 // BootTime returns the time the system was started.
8 func BootTime() time.Time {
9 return btime
10 }
11
12 // Uptime returns the duration the system has been up.
13 func Uptime() time.Duration {
14 return time.Now().Sub(btime)
15 }