Timers and time
The timer
Section titled “The timer”llSetTimerEvent: “Cause the timer event to be triggered a maximum of once every sec seconds. Passing in 0.0 stops further timer events.” From the wiki caveats on timer and llSetTimerEvent:
- “Only one timer can be active at one time.”
- “The timer persists across state changes, but gets removed when the script is reset.”
- “Setting a new timer replaces the old timer and resets the timer clock.”
- “The timer event is not an interrupt, it will not pause the execution of the currently running event to execute the timer.”
- The time between timer events can be longer because of time dilation (see
llGetRegionTimeDilation), the default event delay, long-running events, andllSleep.
Pausing
Section titled “Pausing”llSleep: “Puts the script to sleep for sec seconds. The script will not do anything during this time.” and “The script will sleep at least until the next server-frame, which happen every (1/45 = ~0.02222) seconds under normal conditions.”
Reading time
Section titled “Reading time”llGetTimereturns a float “that is script time in seconds with subsecond precision since the script started, was last reset, or call to either llResetTime or llGetAndResetTime.”llGetUnixTimereturns an integer “that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock”. Caveat: “Scripts that rely on this function after January 19, 2038 may have logical errors.” withllGetTimestampsuggested instead.
Reference
Section titled “Reference”llSetTimerEvent,timer,llSensorRepeatllGetTime,llResetTime,llGetAndResetTimellGetUnixTime,llGetTimestamp,llGetWallclockllSleep,llGetRegionTimeDilation
Quotations are from the Second Life Wiki pages LlSetTimerEvent (revision 1214214, 2023-07-05), Timer (revision 1194108, 2015-01-22), LlSleep (revision 1217326, 2024-09-22), LlGetTime (revision 1218600, 2026-01-31) and LlGetUnixTime (revision 1218796, 2026-04-20), including the transcluded Template:Issues/SVC-3293 (revision 1155854, 2011-10-17), Template:Issues/BUG-4703 (revision 1185042, 2013-12-13) and Template:Issues/SVC-6357 (revision 1057662, 2010-10-09); history, by Second Life Wiki contributors, under CC BY-SA 3.0. Last wiki edit: .