title: Check that we need to sleep in glfwSwapBuffers method
body: <p>I'm trying to create sample app using glew and glfw. The main loop is straightforward and looks like:</p>
  
  <pre><code> while (running) {
      someUsefullMathHere();
      renderer-&gt;render(timeDelta);
  
      glfwSwapBuffers(window);
      glfwPollEvents();
  
      running = running &amp; (!glfwWindowShouldClose(window));
  }
  </code></pre>
  
  <p>The problem is that due to vsync current thread sleep for some tiin the glfwSwapBuffers execution (fps limited to 60 fps). I looking for a way to utilise this time for someUsefullMath method consecutive executions. Ideally code must looks something like:</p>
  
  <pre><code>while (running) {
      while (!timeToRenderAndSwap()) {
          someUsefullMathHere();
      }
      renderer-&gt;render(timeDelta);
  
      glfwSwapBuffers(window);
      glfwPollEvents();
  
      running = running &amp; (!glfwWindowShouldClose(window));
  }
  </code></pre>
  
  <p>Is there a way for this? </p>