[WinAPI] Time confusion

Started by
0 comments, last by JohnBolton 18 years, 7 months ago
Want to get time difference.

      FILETIME ft;
      FILETIME ft2;
      SYSTEMTIME st2;
      GetSystemTime(&st2);
      
      SystemTimeToFileTime(&st, &ft);
      SystemTimeToFileTime(&st2, &ft2);
      
      __int64* time = (__int64 *)&ft;
      __int64* time2 = (__int64 *)&ft2;

Q: time2-time will return milliseconds*100 ?
ai-blog.org: AI is discussed here.
Advertisement
From MSDN:

The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).

So your results will be in units of 0.0001 milliseconds (0.0000001 seconds)
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement