mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Cast system uptime to time.Duration to fix cross build.
This commit is contained in:
parent
102f267b6a
commit
d41c2503e7
@ -392,7 +392,7 @@ func getNodeTime() (time.Time, time.Time, error) {
|
||||
// Get node boot time. NOTE that because we get node current time before uptime, the boot time
|
||||
// calculated will be a little earlier than the real boot time. This won't affect the correctness
|
||||
// of the test result.
|
||||
bootTime := nodeTime.Add(-time.Duration(info.Uptime * int64(time.Second)))
|
||||
bootTime := nodeTime.Add(-time.Duration(info.Uptime) * time.Second)
|
||||
|
||||
return nodeTime, bootTime, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user