I found this site
http://www.guyrutenberg.com/2007/09/22/profiling-code-using-clock_gettime/
If I have a server-client code and this:
clock_gettime(CLOCK_REALTIME, &time_a); // create socket
clock_gettime(CLOCK_REALTIME, &time_b); // close socket
If I have a and b wand want to measure the time it takes to communicate, what's the best way ? Still not fully understanding the exact difference between
CLOCK_REALTIME
CLOCK_PROCESS_CPUTIME_ID
CLOCK_THREAD_CPUTIME_ID
And there are a few others.