Code: Select all
MsgBox, % "Uptime: " FormatSeconds(DllCall("GetTickCount") / 1000)
MsgBox, % "Uptime: " FormatSeconds(DllCall("GetTickCount64") / 1000)
FormatSeconds(NumberOfSeconds, TimeFormat = "") {
if !TimeFormat
TimeFormat = HH:mm:ss
Time = 19990101
Time += %NumberOfSeconds%, Seconds
FormatTime, Output1, %Time%, %TimeFormat%
FormatTime, Output2, %Time%, YDay
return Output2-1 "d:" Output1
}