Hi I'm trying to get the system time and user time of applications being forked by a shell. I'm just not sure what kind of time I'm getting, seconds? milliseconds? Does anybody know?
printf("System time: %ld.%06ld sec\n",usage.ru_stime.tv_sec, usage.ru_stime.tv_usec);
printf("User time: %ld.%06ld sec\n\n",usage.ru_utime.tv_sec, usage.ru_utime.tv_usec);
This is a sample of the results I get. I have the time as seconds, but I'm not really sure
# PID Name System Time User Time
*****************************************************
1 12420 firefox 0.148009 sec 0.816051 sec
2 12429 gimp 0.444027 sec 2.512157 sec
3 12442 clear 0.000000 sec 0.000000 sec