mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-08 11:07:42 +08:00
feat: add system page
This commit is contained in:
13
pkg/uptime/uptime.go
Normal file
13
pkg/uptime/uptime.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package uptime
|
||||
|
||||
import "time"
|
||||
|
||||
var startTime time.Time
|
||||
|
||||
func Uptime() time.Duration {
|
||||
return time.Since(startTime)
|
||||
}
|
||||
|
||||
func init() {
|
||||
startTime = time.Now()
|
||||
}
|
||||
Reference in New Issue
Block a user