I have a multi-process program written in C, where the parent forks a number of children, and I need to calculate its running time, and compare it with the running time of a multi-threaded program which does the same task as that by the multi-process one.
Except using time.h's clock function (which reports CPU time, thus may report more time in a multi-threaded program if no. of threads is high), what else can I use to calculate both programs' running time for comparison purposes ?
I am currently using time ./a.out to calculate their running time.