mirror of
https://github.com/lyx0/nourybot-matrix.git
synced 2024-11-13 19:49:54 +01:00
20 lines
205 B
Go
20 lines
205 B
Go
|
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
|
||
|
}
|