Hello, I need some help! I need to have timer into DLL but until this timer is stanby the processor must be free to work other. I try to make loop with GetMessageA but result is not good.
Can you give me little example?
If you're looking for something more high-resolution, I've been using QueryPerformanceCounter (https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx), which is encouraged over rdtsc/p. It's trickier to use than sleep/setTimer, but the overhead is 10s-100s of cycles with fine-grained results.
I've written some wrappers for them, but haven't spent much time on it. One version seems to work and notifies when x ms pass, or that x ms pass, the other function returns the same in microseconds. They're not tested enough, but seemed to time the correct amount of time elapsed so far. They use qpc mainly like this:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum