title: C - gettimeofday for computing time?
body: <p>do you know how to use gettimeofday for measuring computing time? I can measure one time by this code:</p>
  
  <pre><code>  char buffer[30];
    struct timeval tv;
  
    time_t curtime;
  
  
  
   gettimeofday(&amp;tv, NULL); 
   curtime=tv.tv_sec;
  
   strftime(buffer,30,"%m-%d-%Y  %T.",localtime(&amp;curtime));
   printf("%s%ld\n",buffer,tv.tv_usec);
  </code></pre>
  
  <p>This one is made before computing, second one after. But do you know how to subtracts it?</p>
  
  <p>I need result in miliseconds</p>