Merge pull request #24728 from ksw2000/refact-usage-of-uptime

refact: use uptime.minutes instead of uptime.seconds
This commit is contained in:
openshift-merge-bot[bot] 2024-12-02 10:54:19 +00:00 committed by GitHub
commit 992b80439a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ func (r *Runtime) hostInfo() (*define.HostInfo, error) {
var buffer bytes.Buffer
buffer.WriteString(fmt.Sprintf("%.0fh %.0fm %.2fs",
uptime.hours,
math.Mod(uptime.seconds, 3600)/60,
math.Mod(uptime.minutes, 60),
math.Mod(uptime.seconds, 60),
))
if int64(uptime.hours) > 0 {