Newbie - Timers and Send

Stephen King st.king42 at
Tue Dec 9 02:26:04 EST 2003


I have used this method as well, but found that it didn't work too well for
short time increments, in 10's of mSec as the Send message will only accept
integer values of mSec. So I went to the system clock instead.
Dynamically adjusting the Send delay worked Ok for me on longer delays

Erik -
Will try and post an example this evening (for UK) if no one else has done
it - off to work now!


>I agree.  Always go to the clock for accurate timing.  An alternative
>to the above procedure would be to adjust the delay specified in the
>send to target the end of the next period.
>Dar Scott

>> The way I got around it was to 'Send' more often than I needed (every
> >10
>> mSec in my case), then check the elapsed time between 'Send's against
>> the
>> system clock to update my timer - Using 'Send' a bit like an
>> interrupt. This
>> method worked fine, accurate to 0.01 seconds with no noticable
>> overhead on
>> processing.

More information about the Use-livecode mailing list