Hi,
I confess I am stuck. Can anyone see a problem with the following code, to be run under Linux, compiled with g++ ?
#include <stdio.h>
#include <sys/types.h>
#include <sys/times.h>
int main () {
struct tms tmp;
times(&tmp);
printf("stime %d \n",tmp.tms_stime);
printf("utime %d \n",tmp.tms_utime);
return(0);
}
The code compiles and runs no problem.
I was expecting an output of a couple of large numbers that changed with time. Instead all I get it '0' and '1'.