Subj : Re: any function to handle this kind of counting? To : comp.programming From : Rob Thorpe Date : Mon Aug 01 2005 05:12 am Randy wrote: > Jon Harrop wrote: > > Randy wrote: > > $ time ./collate4 10 2000 Array based > > > > real 0m0.007s > > user 0m0.010s > > sys 0m0.000s > > > > That's interesting. I just wrote an array-based version in C and ran > it on my 2.2 GHz P4, and my timings were: > > % time ./a.out > 0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w Jon, Randy: This type of timing on Linux/*nix systems where the result of the "time" command is a very small number doesn't work. You must make the program do significant enough amount of work to get the figures into seconds or at least jiffies before you get a meaningful answer. .