Correctly handle long running processes on OSX

The full etime format is dd-hh:mm:ss. Replacing '-' with ':' fixes parsing of this format.
This commit is contained in:
Tom Elliott 2016-08-26 11:49:57 -04:00 committed by GitHub
parent 0130d5f088
commit 1435987652
1 changed files with 1 additions and 1 deletions

View File

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