queryperformancecounter

QueryPerformanceCounter and thread safety

Hey all, I'm thinking about making repeated calls (spinning) to QueryPerformanceCounter in two threads that will be active at the same time. I'm not sure if this is really an issue as I've not seen anything written about it but is QueryPerformanceCounter thread safe? Thanks ...

What good are thread affinity mask changes for the current thread?

Hello, I'm writing a game engine and I need a way to get a precise and accurate "deltatime" value from which to derive the current FPS for debug and also to limit the framerate (this is important for our project). Doing a bit of research, I found out one of the best ways to do this is to use WinAPI's QueryPerformanceCounter function. G...

QueryPerformanceCounter Not Working Properly on Amazon EC2 with Win Server 2008

Our application makes use of QueryPerformanceCounter to measure timings. When running it on Amazon EC2 instances we are noticing number that are out of whack. The symptoms look very similar to what has been reported with virtualized machines on HP proreliant servers, however all the articles state that this was not the case for Windows S...

C GetTickCount (windows function) to Time (nanoseconds)

Hello guys, I'm testing one code provided from my colleague and I need to measure the time of execution of one routine than performs a context switch (of threads). What's the best choice to measure the time? I know that is available High Resolution Timers like, QueryPerformanceCounter QueryPerformanceFrequency but how can I translate...