Skip to main content
gamedev.net
🔒 Locked

High resolution timer

Started by gerogerber 5 replies 950+ views
Original Post
gerogerber
gerogerber
I currently develop an editor which also does realtime-rendering. Currently I use SetTimer(...) and OnTimer(...) to render in realtime. But I only get max. 100 frames. Is there a faster timer which I can integrate into my MFC construct which perhaps also calls OnTimer(...)? Gero Gerber
IndirectX
IndirectX
timeGetTime, which is accurate up to 1 ms, or QueryPerformanceTimer which is slower but better.

Edit: this is probably not what you're looking for. You need a to override OnIdle in CMyApp and call your OnTimer function from there, which will give you 'realtime' performance.

[edited by - IndirectX on June 15, 2002 2:56:08 PM]
---visit #directxdev on afternet <- not just for directx, despite the name
daerid
daerid
What about GetTickCount()? isn''t that the same thing as timeGetTime() ?
daerid@gmail.com
IndirectX
IndirectX
No, its resolution varies (based on what I''ve heard/tested) between 10 ms and 50 ms or so.
---visit #directxdev on afternet <- not just for directx, despite the name
Shannon Barber
Shannon Barber
quote:
Original post by gerogerber
I currently develop an editor which also does realtime-rendering. Currently I use SetTimer(...) and OnTimer(...) to render in realtime. But I only get max. 100 frames. Is there a faster timer which I can integrate into my MFC construct which perhaps also calls OnTimer(...)?

Gero Gerber


If you''re making an MFC app, and you want a well-behaved renderer, render in a seperate thread from the application thread. It won''t stall when the user clicks a menu item for instance.
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
gerogerber
gerogerber
Thanks for all your answers - I''ll give them a try!

Gero

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.