Can I measure th refresh rate?

Can I measure th refresh rate?
I have to measure the refrash rate of my program for see the performance?
How can I do?

Do you mean refreshrate or fps?
Refreshrate is easy to get from windows with EnumDisplaySettings, at least in Win2k.
Fps can be easily determined with the help of QueryPerformanceCounter & QueryPerformanceFrequency.

An even simpler way to calculate FPS if it is for a quick personal reference is to add a counter say int frames and in your draw function increment it by one frames++ and print this number to the screen. Run your program using a stop watch and FPS = frames /time in seconds.

Originally posted by Tim Stirling:
An even simpler way to calculate FPS if it is for a quick personal reference is to add a counter say int frames and in your draw function increment it by one frames++ and print this number to the screen. Run your program using a stop watch and FPS = frames /time in seconds.

There is a GLUT function that do this ?