Given that you are discussing the members tms_utime and tms_stime struct tms (which contains 4 elements of type clock_t ) used by times() , the difference is what is indicated in my first and last comments:
The tms_utime element is the time it takes to execute your code, or the code in the C library. The tms_stime element is the amount of time it takes to execute the kernel code on your behalf. ( tms_cutime and tms_cstime are the sums of tms_utime and tms_stime respectively for all the child processes that came out - see the rationale comment.)
There is no breakdown of time into "time spent waiting for cache", but "time spent waiting for cache." I think the cache time will be included in the tms_stime value, because when the data is not in the cache, you will need a system to get it for you.
Jonathan Leffler Apr 16 '14 at 1:59 2014-04-16 01:59
source share