How can I convert FILETIME to seconds? I need to compare two FILETIME objects..
I found this, but seems like it doesn't do the trick...
ULARGE_INTEGER ull;
ull.LowPart = lastWriteTimeLow1;
ull.HighPart = lastWriteTimeHigh1;
time_t lastModified = ull.QuadPart / 10000000ULL - 11644473600ULL;
ULARGE_INTEGER xxx;
xxx.LowPart = currentTimeLow1;
xxx.HighPart = currentTimeHigh1;
time_t current = xxx.QuadPart / 10000000ULL - 11644473600ULL;
unsigned long SecondsInterval = current - lastModified;
if (SecondsInterval > RequiredSecondsFromNow)
return true;
return false;
I compared to 2 FILETIME and expected diff of 10 seconds and it gave me ~7000... Is that a good way to extract number of seconds?