From ced31a7257ab6d358a915dc3d25aabc5cb451bdc Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Sun, 22 Sep 2024 16:15:21 +0900 Subject: [PATCH] state: round printed uptime to the second Signed-off-by: Ophestra Umiker --- internal/state/print.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/state/print.go b/internal/state/print.go index b4c74a9..5ad7cac 100644 --- a/internal/state/print.go +++ b/internal/state/print.go @@ -98,7 +98,7 @@ func (s *simpleStore) mustPrintLauncherState(w **tabwriter.Writer, now time.Time if !verbose.Get() { _, _ = fmt.Fprintf(*w, "\t%s\t%d\t%s\t%s\t%s\t%s\n", - s.path[len(s.path)-1], state.PID, now.Sub(state.Time).String(), strings.TrimPrefix(ets.String(), ", "), state.Launcher, + s.path[len(s.path)-1], state.PID, now.Sub(state.Time).Round(time.Second).String(), strings.TrimPrefix(ets.String(), ", "), state.Launcher, state.Command) } else { // emit argv instead when verbose