Hi,
I am trying to use a Timer object to make an API call to an external library every so often (~fractions of a second).
t = timer;set(t,'ExecutionMode','fixedDelay','BusyMode','drop','Period',0.005);t.TimerFcn = @my_callback_fcn;
While I don't need precise control over the instantaneous period, and I am ok with executions getting dropped once in a while, I need the average period to be around 5 milliseconds (specified above).
However, when I run the above timer on my Matlab R2009b (on Win XP sp2) with a dummy callback (nothing inside my_callback_fcn), it takes at least ~16 ms between successive timer executions i.e. the frequency of calling TimerFcn is about 60Hz.
Is the timer period something I can reduce to a value smaller than 16ms? Or is this a system limited value?
I would appreciate some feedback.
Thanks,
Sridhar
Best Answer