I need help timing an Algorithm
I'm using unformated time not in seconds
using the function clock()
I need to run this program 10 times and get an average time for it I do this by having a big for loop that will run it 10 times
and the problem is that when i run it for sometimes it gives zero time
Ex:
0
0
0
0
0
10
0
0
0
0
Of course the average is 1
Is there any particular reason why it gives 0 time
Does the hardware affects the time(processor Memory etc,)