mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
refact: use uptime.minutes instead of uptime.seconds
Signed-off-by: ksw2000 <13825170+ksw2000@users.noreply.github.com>
This commit is contained in:
@ -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 {
|
||||||
|
Reference in New Issue
Block a user