title: How can one measure time for a large block of code except when stopped at a breakpoint?
body: <p>I am working on a C++ game / simulation / graphics application on Windows.<br>  <em>(edit start)</em> If it matters, I am using Visual Studio 2013. <em>(edit end)</em></p>
  
  <p><strong>Setup:</strong> I am measuring the time from one frame to the next using QueryPerformanceCounter().   </p>
  
  <p><strong>Steps to Reproduce:</strong>
  Stop at a breakpoint for some debugging. </p>
  
  <p><strong>Current Undesired Result:</strong> When application resumes execution, the next time QueryPerformanceCounter() is called, it will return a time value that includes all of the time was spent paused at the debugger.  This results in a frame time length that is abnormally large.</p>
  
  <p><strong>Desired Result:</strong> QueryPerformanceCounter() will return a time value that does not include however much time I spent paused at a breakpoint for debugging.</p>
  
  <p>How can I achieve the desired result?<br>
   1. Is there a different function that I should use instead of QueryPerformanceCounter?<br>
   2. Is there some setting in an IDE (i.e. Visual Studio) that can be changed?<br> 
   3. Is there some special way to use QueryPerformanceCounter or other
      time function?<br>
   4. etc.</p>
  
  <p><strong>Reference Notes:</strong> There is a somewhat similar question listed here, but it was not helpful for me to identify a solution. <a href="https://stackoverflow.com/questions/11155682/tracking-time-spent-in-debugger">Tracking Time Spent in Debugger</a></p>