Get the current time in C - Stack Overflow The time libraries and system calls in Linux are not astounding, but even so you would want to use them, not go out to a shell command and try to parse it See the man pages for time and ctime and rtc Protected question To answer this question, you need to have at least 10 reputation on this site (not counting the association bonus)
What specifically are wall-clock-time, user-cpu-time, and system-cpu . . . Wall-clock time is the time that a clock on the wall (or a stopwatch in hand) would measure as having elapsed between the start of the process and 'now' The user-cpu time and system-cpu time are pretty much as you said - the amount of time spent in user code and the amount of time spent in kernel code The units are seconds (and subseconds, which might be microseconds or nanoseconds) The