SetTimerOn() uses Milliseconds, not Seconds?
by David Higgins · in Torque Game Builder · 08/16/2006 (6:39 pm) · 1 replies
I believe the documentation for the setTimerOn() function is incorrect.
It states that the parameter is a float, which represents the number of 'seconds', which in testing it appears to be the number of 'milliseconds'
I would assume that 0.5 would be 500 milliseconds, where as 500 appears to be a more accurate representation of this. Also, when setting the %timePeriod parameter to anything below 0.01 (ie; 0.001 or 0.009) I seem to recieve errors from Visual C++ stating that Internal Memory state is corrupted, and the engine just stops running. I do have VC++ installed, so that may be a debugger message from VS rather then an actual message from Windows ...
It states that the parameter is a float, which represents the number of 'seconds', which in testing it appears to be the number of 'milliseconds'
setTimerOn(%timePeriod) Purpose Sets a timer on the object that, when it expires, will cause the object to execute the onTimer callback. Syntax %timePeriod - Float The period of time, in [b]seconds[/b], between each callback. Notes * The timer event will continue to occur at regular intervals until setTimerOff() is called.
I would assume that 0.5 would be 500 milliseconds, where as 500 appears to be a more accurate representation of this. Also, when setting the %timePeriod parameter to anything below 0.01 (ie; 0.001 or 0.009) I seem to recieve errors from Visual C++ stating that Internal Memory state is corrupted, and the engine just stops running. I do have VC++ installed, so that may be a debugger message from VS rather then an actual message from Windows ...
About the author
Torque Owner Shane B.