Archive: Time in Milliseconds


Time in Milliseconds
Is there a way to get time in milliseconds? I'm trying to track time since last reboot and while I've got the time since startup (System::Call "kernel32::GetTickCount() i.r1") figured out, I don't know how to get the actual time of the computer in millseconds.


Any ideas/help?


I'm not sure there is an API that does this directly but you could use GetLocalTime/GetSystemTime (already implemented in GetTime) and do lots of System::Int64 multiplications.

Stu


GetLocalTime/GetSystemTime + SystemTimeToFileTime (+FileTimeToLocalFileTime)
or
GetSystemTimeAsFileTime
or
NtQuerySystemTime (sort of undocumented)

--

FILETIME is a 64 bit number of 100-nanosecond intervals since January 1, 1601 (UTC), use System::Int64 to get ms or whatever you need