refact: use uptime.minutes instead of uptime.seconds

Signed-off-by: ksw2000 <13825170+ksw2000@users.noreply.github.com>
This commit is contained in:
ksw2000 2024-12-02 07:35:52 +00:00
parent 2385257d08
commit 49b52227b4
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 var buffer bytes.Buffer
buffer.WriteString(fmt.Sprintf("%.0fh %.0fm %.2fs", buffer.WriteString(fmt.Sprintf("%.0fh %.0fm %.2fs",
uptime.hours, uptime.hours,
math.Mod(uptime.seconds, 3600)/60, math.Mod(uptime.minutes, 60),
math.Mod(uptime.seconds, 60), math.Mod(uptime.seconds, 60),
)) ))
if int64(uptime.hours) > 0 { if int64(uptime.hours) > 0 {