• Advertisement
Sign in to follow this  

timer system

This topic is 2066 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'm searching for an efficent timer system for using it in a opengl graphics application.
There is something already done?or open source?
I'm using c++.
thanks.

Share this post


Link to post
Share on other sites
Advertisement
What features do you look for in a "timer system"?

If you're using a compiler that supports C++11, then take a look at std::chrono::high_resolution_clock: High resolution precision, and cross-platform. If your compiler doesn't support C++11, then you might consider using boost's version of std::chrono, boost::chrono.

If none of these are viable options, then you'll be stuck writing platform-specific code. In win32, it's QueryPerformanceCounter, QueryPerformanceFrequency, timeGetTime, GetTickCount, and etc. In a POSIX system, it's apparently clock_gettime.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement