How to get ticks with the same format as DateTime.Ticks in C ++ ATL / MFC

Is it possible to get a tick number with the same format as the DateTime.Ticks.NET Object, which is in 100ns units, in C ++ ATL or MFC

+3
source share
1 answer

DateTime.Tickshas no effect on the resolution of the timer, so you are not promised that the timer is 100 tones. In C ++, you have a similar value using:

ULONGLONG nTicks = GetTickCount() * 10000i64;

If you need a more accurate timer, look at the implementation QueryPerformanceCounter. Cm:

UPD. .NET Ticks, . Hans - , / GetFileTime API, 100 Ticks .

+2

All Articles