Files
tslink/gui/util.go
T
2026-07-26 09:39:17 +00:00

21 lines
436 B
Go

package gui
import (
"runtime"
"time"
)
// runtimeInfo describes the host, for diagnostic bundle headers.
func runtimeInfo() string {
return runtime.GOOS + "/" + runtime.GOARCH + " go" + runtime.Version()[2:]
}
// timeSince is time.Since, wrapped so tests can reason about it and so call
// sites in layout code read consistently.
func timeSince(t time.Time) time.Duration {
if t.IsZero() {
return 0
}
return time.Since(t)
}