title: Timing a function in a C++ program that runs on Linux
body: <p>I am trying to time a function of my C++ program using the amount of time that it takes to execute in user space.  I tried the clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &amp;start) command from inside the program but I am afraid that this is the CPU time and not the User Time that I actually need.   The time "program name" will not work in this case because I am only timing a function.  Any help would be great. 
  Thanks!</p>