What would be the best way to measure the frame rate of my OpenGL program?
Measure the elapsed time and count the number of frames. Divide one by the other to give frame rate.
When the elapsed time reached one second, or more if you want to average it over a longer time period reset both counts and start again.