Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting ULARGE_INTEGER QuadPart in to millisecond

Tags:

c++

winapi

I found this code int the net. I need to convert time in to millisecond.I am not able find out what QuadPart represent.Is this value is in Millisecond or nanosecond ..

Help me convert QuadPart values in to millisecond.

SYSTEMTIME st;
GetSystemTime(&st);

FILETIME ft;
SystemTimeToFileTime(&st, &ft);  // converts to file time format
ULARGE_INTEGER ui;
ui.LowPart=ft.dwLowDateTime;
ui.HighPart=ft.dwHighDateTime;

// ui.QuadPart;
like image 266
Vikram Ranabhatt Avatar asked Jun 08 '26 05:06

Vikram Ranabhatt


1 Answers

ui.QuadPart would be the amount of 100-nanosecond ticks since January 1, 1601 (UTC). To get the number of milliseconds since January 1, 1601 (UTC) divide it by 10000.

See documentation for the FILETIME structure.

like image 195
dalle Avatar answered Jun 10 '26 17:06

dalle



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!