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:
parent
0130d5f088
commit
1435987652
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue