Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: 64 64-bit bit int integer QueryUnbiasedInterruptTime bitwise floating point number
Here is what I came up with:
;BOOL QueryUnbiasedInterruptTime( ; _Out_ PULONGLONG UnbiasedTime ;); If WinVersion( 5 ) < '2-6-1' Pause('Notice','Not Supported on this Platform') Exit EndIf hDll = DllLoad(DirWindows(1):"kernel32.dll") lpUnbiasedTime = BinaryAlloc(8) rslt = DllCall( hDll, long:'QueryUnbiasedInterruptTime',lpBinary:lpUnbiasedTime ) time = BinaryPeekFlt( lpUnbiasedTime, 0 ) ; Peeks a 64 bit floating point number. Pause('Unbiased interrupt-time count in system time units of 100 nanoseconds.',time) BinaryFree( lpUnbiasedTime ) Exit
hUnbiasedTime = BinaryAlloc(8) nResult = DllCall(DirWindows(1):"kernel32.dll", long:'QueryUnbiasedInterruptTime',lpBinary:hUnbiasedTime ) BinaryEODSet(hUnbiasedTime, 8) nlower = BinaryPeek4(hUnbiasedTime, 0 ) nupper = BinaryPeek4(hUnbiasedTime, 4 ) ; Not likely to ever be negative but for completeness's sake. if nupper < 0 then nupper = (nupper & 2147483647) * 2.0 nupper = nupper * 4294967296.0 ; This on the other hand can often be negative. if nlower < 0 then nlower = (nlower & 2147483647) * 2.0 ; Total and convert to seconds nUptime = nupper + nlower nUptime = nUptime/10000000.0 Pause('System Up Time',nUpTime:' sec.') BinaryFree( hUnbiasedTime ) Exit
Article ID: W17907
Filename: Brute Force Way to Convert an int64 that WinBatch Can Handle.txt
File Created: 2013:07:02:08:06:26
Last Updated: 2013:07:02:08:06:26