MATLAB: Do I receive an error when I set the Timer function to start after 30 days in MATLAB 7.2 (2006a)

lengthlongmanyMATLABstartingtimetimers

When I execute the following
t1=timer('TimerFcn','disp(''it is 11 o''''clock'')');
startat(t1,[2006,x,28,11,48,00]);
where x is say 3 months from now. I receive the following error
??? Error using ==> timer.startat
StartDelay property cannot be set.

Best Answer

This change has been incorporated into the documentation in Release 2010a (R2010a). For previous releases, read below for any additional information:
The following information is missing from documentation on the STARTAT function in MATLAB 7.2 (2006a).
The 'StartDelay' property of a timer is limited to approximately 25 days. This is due to the fact that the 'StartDelay' property of the Timer Object cannot be set to a value greater than the maximum representable 32-bit integer/1000 (approximately 2.1474e+006).
In MATLAB, the 'StartDelay' property is specified as the delay in seconds between the start of the timer and the first execution of the function specified in TimerFcn. However, the timer object is implemented using the Java Timer, which works in milliseconds, thus 2.1474e+006 in seconds becomes 2.1474e+009 in milliseconds. Furthermore, the Java timer's delay property must be a 32-bit integer value, which consequently means that 2.1474e+009 is the maximum possible value. This is approximately 25 days from the current date.