I am trying to print a value of type timeval. Actually I am able to print it, but I get the following warning:
Multiple markers at this line
In the GNU C Library, struct timeval:
is declared in sys/time.h and has the following members:
long int tv_secThis represents the number of whole seconds of elapsed time.
long int tv_usecThis is the rest of the elapsed time (a fraction of a second), represented as the number of microseconds. It is always less than one million.
So you will need to do
printf("%ld.%06ld\n", usage.ru_stime.tv_sec, usage.ru_stime.tv_usec);
to get a "nicely formatted" timestamp like 1.000123.