toast
fb3e0da610
All checks were successful
Build and push container image / build (push) Successful in 38s
19 lines
331 B
Go
19 lines
331 B
Go
package toolbox
|
|
|
|
import "time"
|
|
|
|
/*
|
|
System/OS-related utilities such as uptime.
|
|
*/
|
|
|
|
var timerStart = time.Now()
|
|
|
|
/*
|
|
Nor the Go or the Disgo library has a built-in
|
|
Client/Process uptime function, so I had to get creative.
|
|
*/
|
|
func GetUptime() string {
|
|
uptime := time.Since(timerStart)
|
|
return uptime.Round(time.Second).String()
|
|
}
|