I'm trying to measure real, usr and sys times multiple times. I've made function
void get_clock(clock_t real_time, struct tms cpu_time){
real_time = times(&cpu_time);
}
to use for gathering start and end times:
clock_t st_time;
clock_t en_time;
struct tms st_cpu;
struct tms en_cpu;
and it seems to work great the first time I use get_clock() for start and end, but every time difference I get is the same, which I believe is because the values are not getting updated.