Gurus,
I was trying out different time functions. I wanted to record the run time of a code. My concern is that the result is too accurate? or say fake. doesnt runtime of the subroutine itself also cost a tiny bit of time and make records something like 30.0xxx? Please check below code and result
I was trying out different time functions. I wanted to record the run time of a code. My concern is that the result is too accurate? or say fake. doesnt runtime of the subroutine itself also cost a tiny bit of time and make records something like 30.0xxx? Please check below code and result
VBA Code:
Sub pop2()
For x = 1 To 10
st = Timer
d = st + 3
For Each cell In Range(Cells(18, 1), Cells(18, 10))
Do
Loop Until d <= Timer
d = Timer + 3
cell.Interior.ColorIndex = 3
Next cell
st = Timer - st
Range("o100").End(xlUp).Offset(1, 0) = st
Range(Cells(18, 1), Cells(18, 10)).Clear
Next x
End Sub
timer |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |
30.000 |