From 15a267b57d2394dd5cb697f9a80b6df4fc939a76 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Tue, 18 Mar 2014 01:34:43 +0000 Subject: [PATCH] add time since exit in docker ps Docker-DCO-1.1-Signed-off-by: Victor Vieux (github: vieux) --- runtime/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/state.go b/runtime/state.go index cce6912b46..1c682acd26 100644 --- a/runtime/state.go +++ b/runtime/state.go @@ -28,7 +28,7 @@ func (s *State) String() string { } return fmt.Sprintf("Up %s", utils.HumanDuration(time.Now().UTC().Sub(s.StartedAt))) } - return fmt.Sprintf("Exit %d", s.ExitCode) + return fmt.Sprintf("Exited (%d) %s ago", s.ExitCode, utils.HumanDuration(time.Now().UTC().Sub(s.FinishedAt))) } func (s *State) IsRunning() bool {