Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Which Timer is the best?

This topic is 5854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I''ve heard that Delphi''s standard Timer isn''t a very good one, and thus I''ve been using the one that came with DelphiX, but now I''ve heard that it isn''t very good either. Is there a better one, or am I just listening to false rumours?

Share this post

Link to post
Share on other sites
TTimer is based on the Windows WM_TIMER message. This doesn''t guarantee anything better than 55 millisecond updates - that is, you can set the interval lower but it might not update as fast as you say. This leads to jerky animation.

You can grab TRXTimer (you''ll have to search for it - I don''t know where the rxlib site is just now). That''s pretty good. Also, there''s a DX Timer thingy that Hori wrote - most of the examples on my site come bundled with that one (TCDNDXTimer, I think the name is).

You can implement your own timing using GetTickCount, TimeGetTime (with appropriate init) or QueryPerformanceCounter.

I''m writing an article on this very topic, believe it or not . It''s nowhere near finished (so don''t take it as a production quality tutorial, please...):
A sneak preview

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!