1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

ui: Display server uptime, scan completion time

This commit is contained in:
James Hillyerd
2018-12-10 20:54:02 -08:00
parent 9b3049562d
commit fc5cc4d864
4 changed files with 52 additions and 35 deletions

View File

@@ -40,10 +40,8 @@ var (
func init() {
// Server uptime for status page.
startTime := time.Now()
expvar.Publish("uptime", expvar.Func(func() interface{} {
return time.Since(startTime) / time.Second
}))
startTime := expvar.NewInt("startMillis")
startTime.Set(time.Now().UnixNano() / 1000000)
// Goroutine count for status page.
expvar.Publish("goroutines", expvar.Func(func() interface{} {