title: How to Make a Basic FPS Counter?
body: <p>I'm trying to display my frames-per-second in my cube-rendering program. I would like to see its performance. So, how can I do it? I have done research on this already, but the examples I've seen use either multiple classes and still don't work, or they use libraries that I don't have. Is there a way to get the FPS by using pre-installed libs like ctime? I am using OpenGL with C++.</p>
  
  <p>Here is my (empty) function:</p>
  
  <pre><code>void GetFPS()
  {
  
  }
  </code></pre>
  
  <p>and then I display my FPS in my render function with:</p>
  
  <pre><code>std::cout &lt;&lt; xRot &lt;&lt; " " &lt;&lt; yRot &lt;&lt; " " &lt;&lt; zRot &lt;&lt; " " &lt;&lt; FPS &lt;&lt; "\n"; //xRot, yRot, and zRot are my cube's rotation.
  </code></pre>
  
  <p>My program is set to 60FPS, but I would like to see the actual FPS, not what it's set to.</p>