mercredi 25 février 2015

Manipulating FILETIME represented by uint64_t

I have FILETIME represented as uint64_t variable in C/C++ code. I want to calculate the uint64_t representation of the time in that variable - X seconds.


is there a way to do that without casting it back to FILETIME and then converting to SYSTEMTIME, subtracting and converting back?


From the documentation of FILETIME (http://ift.tt/1DWr3C5) - "The FILETIME structure represents the number of 100-nanosecond intervals since January 1, 1601"


So I tried to subtract (X*10000000) where 10000000=(Number of nano seconds in a second/100) from the uint64_t representation to get what I want, but I'm not sure the result is what I need.


Thanks!


Aucun commentaire:

Enregistrer un commentaire