diff --git a/TTProxy/ProxyWSockHook.h b/TTProxy/ProxyWSockHook.h index a571a641e..be2725d51 100644 --- a/TTProxy/ProxyWSockHook.h +++ b/TTProxy/ProxyWSockHook.h @@ -471,7 +471,7 @@ class ProxyWSockHook { in_addr addr; struct in6_addr addr6; char* buffer; - DWORD time; + ULONGLONG time; ConnectionInfo(ProxyInfo& proxy, String realhost):proxy(proxy), realhost(realhost), buffer(NULL) { } ~ConnectionInfo() { @@ -664,7 +664,7 @@ class ProxyWSockHook { ConnectionInfo* info = table.get(url); ::LeaveCriticalSection(§ion); if (info != NULL) { - info->time = ::GetTickCount(); + info->time = ::GetTickCount64(); return info; } ProxyInfo proxy; @@ -688,8 +688,8 @@ class ProxyWSockHook { } } if (i >= countof(list)) { - DWORD now = ::GetTickCount(); - DWORD max = 0; + ULONGLONG now = ::GetTickCount64(); + ULONGLONG max = 0; int index = -1; for (i = 0; i < countof(list); i++) { if (list[i] != NULL) { @@ -709,7 +709,7 @@ class ProxyWSockHook { info->addr6.s6_addr[11] = 0xff; info->addr6.s6_addr[15] = i + 1; - info->time = ::GetTickCount(); + info->time = ::GetTickCount64(); return info; } }; diff --git a/doc/en/html/macro/command/uptime.html b/doc/en/html/macro/command/uptime.html index 94df65479..46fe47000 100644 --- a/doc/en/html/macro/command/uptime.html +++ b/doc/en/html/macro/command/uptime.html @@ -17,12 +17,22 @@
uptime <intvar>+
+uptime <secvar> <msecvar> ++
Retrieves the number of milliseconds that have elapsed since the Windows OS was started, and then stores the value into the <intvar> variable. @@ -32,11 +42,29 @@
+Retrieves the number of milliseconds that have elapsed since the Windows OS was started
+using GetTickCount64(), and then stores the following values:
+
GetTickCount64() / 1000)GetTickCount64() % 1000)+Both <secvar> and <msecvar> must be integer variables. +
+-; How to get the uptime in Windows +; Format 1: How to get the uptime in Windows uptime var day = var / 86400000 var = var % 86400000 @@ -61,5 +89,12 @@+Example
messagebox str "running time"
+; Format 2: Get uptime as seconds and milliseconds +uptime sec msec +sprintf2 str "System Up Time: %d.%03d seconds" sec msec +messagebox str "uptime" ++