Code Question, how to clock program...

hello, I would like to know how to clock my OpenGL programs. I do not mean to see how fast it takes them to do somthing, but I want to be able to know how fast my program is cycling through itself and how to adjust it to go though however many times per second, just so that on faster and slower machines my programs will run at the same speed instead of being really fast on one system and really slow on another. Please help if you can… thanks

This shouldn’t go on at all, much less into the Advanced section.