title: C how to measure time correctly?
body: <p>This is the "algorithm", but when I want to measure the execution time it gives me zero. Why?</p>
  
  <pre><code>#define ARRAY_SIZE 10000
  ...
  
  clock_t start, end;
  
  start = clock();
  
  for( i = 0; i &lt; ARRAY_SIZE; i++) 
  {
  non_parallel[i] = vec[i] * vec[i];
  }
  end = clock();
  printf( "Number of seconds: %f\n", (end-start)/(double)CLOCKS_PER_SEC );
  </code></pre>
  
  <p>So What should i do to measure the time?</p>