Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Lag question

Johnny Jedburgh
Registered User
Join date: 12 Jun 2006
Posts: 13
10-30-2006 10:56
A quick lag related question ... I need a script to regularly check it's email queue and wondered which method is less laggy ...

(1) Timer
CODE

state_entry() {
llSetTimerEvent(1);
}

timer() {
llGetNextEmail("", "");
}

(2) Endless loop
CODE
state_entry() {
while (1 != 0){
llGetNextEmail("", "");
}

Many thanks.
grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
10-30-2006 11:02
Use the timer and use a non integer time like 1.23 to reduce the number of scripts triggering at the same instant.