You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here if device uptime is more than 50 days (4320000000 milliseconds for 50 days), u.Length value is getting wrong...
can any one please help me to fix this case.
The text was updated successfully, but these errors were encountered:
if windows device uptime is more than 50 days, this code not working and returning wrong uptime.
var (
kernel32DLL = syscall.MustLoadDLL("kernel32")
)
func (u *Uptime) Get() error {
r1, _, e1 := syscall.Syscall(procGetTickCount64.Addr(), 0, 0, 0, 0)
if e1 != 0 {
return error(e1)
}
u.Length = (time.Duration(r1) * time.Millisecond).Seconds()
return nil
}
here if device uptime is more than 50 days (4320000000 milliseconds for 50 days), u.Length value is getting wrong...
can any one please help me to fix this case.
The text was updated successfully, but these errors were encountered: