title: How do I count how many milliseconds it takes my program to run?
body: <p>This will show how many seconds:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;time.h&gt;
  using namespace std;
  int main(void)
  {
      int times,timed;
  
      times=time(NULL);
      //CODE HERE
  
      timed=time(NULL);
      times=timed-times;
      cout &lt;&lt; "time from start to end" &lt;&lt; times;
  }
  </code></pre>
  
  <p>This will show how many ticks:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;time.h&gt;
  using namespace std;
  int main(void)
  {
      int times,timed;
  
      times=clock();
      //CODE HERE
  
      timed=clock();
      times=timed-times;
      cout &lt;&lt; "ticks from start to end" &lt;&lt; times;
  }
  </code></pre>
  
  <p>How do I get milliseconds?</p>