using time.Since instead time.Now().Sub(t)
parent
6e2a2f7c62
commit
0b4866ce48
|
|
@ -127,7 +127,7 @@ func (*Job) toDuration(status v1.JobStatus) string {
|
|||
switch {
|
||||
case status.StartTime == nil:
|
||||
case status.CompletionTime == nil:
|
||||
return duration.HumanDuration(time.Now().Sub(status.StartTime.Time))
|
||||
return duration.HumanDuration(time.Since(status.StartTime.Time))
|
||||
}
|
||||
return duration.HumanDuration(status.CompletionTime.Sub(status.StartTime.Time))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue