From 1435987652e259ac633b8624ab57c1d74dfe8723 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Fri, 26 Aug 2016 11:49:57 -0400 Subject: [PATCH] Correctly handle long running processes on OSX The full etime format is dd-hh:mm:ss. Replacing '-' with ':' fixes parsing of this format. --- process/process_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process/process_darwin.go b/process/process_darwin.go index 8901960..8ba1619 100644 --- a/process/process_darwin.go +++ b/process/process_darwin.go @@ -111,7 +111,7 @@ func (p *Process) CreateTime() (int64, error) { return 0, err } - elapsedSegments := strings.Split(r[0][0], ":") + elapsedSegments := strings.Split(strings.Replace(r[0][0], "-", ":", 1), ":") var elapsedDurations []time.Duration for i := len(elapsedSegments) - 1; i >= 0; i-- { p, err := strconv.ParseInt(elapsedSegments[i], 10, 0)