mirror-nourybot-matrix/internal/common/uptime.go

20 lines
205 B
Go
Raw Normal View History

2023-05-07 00:13:13 +02:00
package common
import (
"github.com/dustin/go-humanize"
"time"
)
var (
uptime time.Time
)
func StartTime() {
uptime = time.Now()
}
func GetUptime() string {
h := humanize.Time(uptime)
return h
}