SLIDE 5 5 Michael Kuperberg - TimerMeter | JUG Lightning Talks 2010.03.24
Effect of accuracy on measurements
TimerMeter: Foundations (1)
Timer accuracy A
t
Timer method execution duration Actual time point tx to be measured Time point Uk returned by timer method invocation Uk+1=Uk+A Uk+2=Uk+1+A
Timer.time() Timer.time()
Supposed duration of meth() Timer accuracy
t
First timer invocation returns; measured method meth() starts
Time point returned by second timer method invocation Timer value updates Un
meth()
Case 1: accuracy < execution duration
Uk