title: Getting the real, user, sys time of functions within a program
body: <p>looking for assistance on getting the real, user, sys times of functions within my C program. For instance how long it took to read in a file. I have been looking at the #include  and using the time() function with the -p flag but I am striking out on the execution of this.  I guess my question is if I have:</p>
  
  <pre><code>time_t total_time;
  time_t start, end;
  
  start = time(-p, &amp;start);
  
  &lt;some code&gt;
  
  end = time(-p, &amp;end);
  
  printf("real = %e, user = %S, sys = %S\n", ???????????);
  </code></pre>
  
  <p>I understand the differences between the three times, just don't know the proper execution of getting the results.</p>