mirror of
https://github.com/lyx0/nourybot.git
synced 2024-11-13 19:49:55 +01:00
18 lines
262 B
Go
18 lines
262 B
Go
package common
|
|
|
|
import "time"
|
|
|
|
var (
|
|
uptime time.Time
|
|
)
|
|
|
|
// StartTime adds the current time to the uptime variable.
|
|
func StartTime() {
|
|
uptime = time.Now()
|
|
}
|
|
|
|
// GetUptime returns the time from the uptime variable.
|
|
func GetUptime() time.Time {
|
|
return uptime
|
|
}
|