举报
$Ret = DllCall("kernel32.dll", "long", "GetTickCount") If IsArray($Ret) Then $day = "" $msec = StringRight("00" & mod($Ret[0], 1000), 3) $uptime = floor($Ret[0] / 1000) $sec = StringRight("00" & mod($uptime, 60), 2) If $uptime >= 60 Then $uptime = floor($uptime / 60) $min = StringRight("00" & mod($uptime, 60), 2) If $uptime >= 60 Then $uptime = floor($uptime / 60) $hour = StringRight("00" & mod($uptime, 24), 2) If $uptime >= 24 Then $day = floor($uptime / 24) & "天" EndIf EndIf EndIf MsgBox(0, "系统已启动:", $day & $hour & "小时" & $min & "分钟" & $sec & "秒" & $msec & "毫秒") EndIf
#include <WinAPIEx.au3> #include <Date.au3> $timer = _WinAPI_GetTickCount() Local $Hour, $Mins, $Secs _TicksToTime($timer, $Hour, $Mins, $Secs) MsgBox(0, "_WinAPI_GetTickCount", $Hour & "时" & $Mins & "分" & $Secs & "秒") $timer2 = _Date_Time_GetTickCount() Local $Hour2, $Mins2, $Secs2 _TicksToTime($timer2, $Hour2, $Mins2, $Secs2) MsgBox(0, "_Date_Time_GetTickCount", $Hour2 & "时" & $Mins2 & "分" & $Secs2 & "秒")
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-27 17:06 , Processed in 0.097588 second(s), 23 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.