title: Measuring sub-second elapsed time of native C++ on Windows platform
body: <p>What would be a good way to measure sub-second elapsed time of native C++ code on Windows Platform(I am working on Windows Vista, Visual Studio 2010)</p>
  
  <p>I have tried using </p>
  
  <pre><code>#include &lt;ctime&gt;
  
  int main()
  {    
      clock_t start = clock();
      ... some code
      clock_t end = clock();
      double cpu_time = static_cast&lt;double&gt;(end - start)/CLOCKS_PER_SEC;
  }
  </code></pre>
  
  <p>but <code>cpu_time</code> is always <code>0</code>.</p>
  
  <p>Thanks !</p>