hello, I'm having trouble using getrusage, I am trying to use it to measure the resource usage and execution time of an algorithm. The structure "struct timeval ru_utime;" contained within the rusage structure should give me the information im looking for, but i dont know what this structure actually is, etc.
could u pls tell me if this is the way this should be coded?
<code>
int who;
rusage usage;
FRAME message;
who = RUSAGE_SELF;
populate_data(message.data); /* populate the data */
checksum_crc16(message.data, MAXSIZE); /* calculate checksum (algorithm to be tested for usage*/
getrusage(who, usage);
</code>