i have program that uses a lot of file open/close/read/write. the timer says the program took about 10 minutes, but in reality it took 4 hours. why isn't the time taken for the file input and output taken into consideration ?
For the timer, i have used this:
struct rusage usage;
getrusage (RUSAGE_SELF, &usage);