mirror-nourybot/pkg/common/uptime.go

18 lines
262 B
Go
Raw Normal View History

package common
import "time"
var (
uptime time.Time
)
2024-02-28 11:53:39 +01:00
// StartTime adds the current time to the uptime variable.
func StartTime() {
uptime = time.Now()
}
2024-02-28 11:53:39 +01:00
// GetUptime returns the time from the uptime variable.
func GetUptime() time.Time {
return uptime
}