mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-21 04:03:38 +09:00
fix(actions): never show negative running durations (#39322)
This commit is contained in:
@@ -87,7 +87,7 @@ func calculateDuration(started, stopped timeutil.TimeStamp, status Status, fallb
|
||||
}
|
||||
return end.AsTime().Sub(s)
|
||||
}
|
||||
return timeSince(s).Truncate(time.Second)
|
||||
return max(timeSince(s), 0).Truncate(time.Second)
|
||||
}
|
||||
|
||||
// best effort function to convert an action schedule to action run, to be used in GenerateGiteaContext
|
||||
|
||||
Reference in New Issue
Block a user