I'm a newbie in C++.
I need to extract the number of seconds between the current time, say SYSTEMTIME, and Jan. 1, 2000 00:00:00...
I used the following code:
--------------------------------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
- FILETIME ft;
- SYSTEMTIME st;
- time_t tt = time(01/01/2000);
- double timeSpan
- GetSystemTime(&st); // gets current time
- SystemTimeToFileTime(&st, &ft);
- long currTime = ft.dwHighDateTime << 24 | ft.dwLowDateTime;
- timeSpan = difftime(currTime, tt);
Your help would be greatly appreciated....