add time since exit in docker ps

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 15a267b57d2394dd5cb697f9a80b6df4fc939a76
Component: engine
This commit is contained in:
Victor Vieux
2014-03-18 01:34:43 +00:00
parent 3865d7d383
commit bf660d94fc

View File

@ -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 {