From 70dc45ee656e5c505988f2ed890e0aadc9efaac1 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sat, 27 May 2023 12:32:41 +0800 Subject: [PATCH] code optimization --- sysutil.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysutil.go b/sysutil.go index 856a0c6..d7c768a 100644 --- a/sysutil.go +++ b/sysutil.go @@ -11,5 +11,5 @@ func BootTime() time.Time { // Uptime returns the duration the system has been up. func Uptime() time.Duration { - return time.Now().Sub(btime) + return time.Since(btime) }