Multiple timers, one script, or multiple timer scripts?
jetten at gmail.com
Tue Jan 29 05:55:49 PST 2008
Why is it that I feel like an idiot when reading responses to my own
question? lol I'm pretty savvy, but I have no clue what Kubota is saying.
Delta queue? Non-temporal determinism? I'm not complaining, I guess I'm just
learning that there's obviously a whole extra plateau of scripting out there
that I've not even begun to be able see.
On Jan 29, 2008 8:44 AM, Kubota Homewood <sl42 at kryslix.com> wrote:
> You have it right, Argent. Normally I would suggest optimizing it
> further as a delta queue (yes, it really has a name, folks), but I
> assume you are concerned about loss due to the inherit non-temporal
> determinism of LSL scripts. It is possible to easily account for that
> as well, though I am not sure about code size, etc, as I have not
> coded it in LSL.
> After all, on most hardware, and even more OSes, there is only a
> single timer for the entire system. If you need any type of fine
> granularity then a delta queue is the answer.
> On Jan 29, 2008, at 6:56 AM, Argent Stonecutter wrote:
> >> Ayah. I use the nasty flag kludge within the timer event to handle
> >> multiple events.
> > This isn't a kludge, it's a standard event list for turning a single
> > timer into multiple timers. There's similar algorithms in every OS.
> > What you're doing is a duty-cycle algorithm. If you have two timers
> > running at different rates and only a single timer to implement them
> > in, you run a timer at the greatest common factor and set up two
> > counters to tell which event to run.
> > Whether you use an event list or duty-cycle depends on the relative
> > cost of empty timer events or resetting the timer, both in CPU time
> > and potential timer drift.
> > _______________________________________________
> > Click here to unsubscribe or manage your list subscription:
> Click here to unsubscribe or manage your list subscription:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the secondlifescripters