You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
233 B

package main
import (
"math"
"time"
)
var uptime time.Time
// Uptime reports how long the program has been running
func Uptime() float64 {
return math.Floor(time.Since(uptime).Seconds())
}
func init() {
uptime = time.Now()
}