<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlSetTimerEvent</id>
	<title>LlSetTimerEvent - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlSetTimerEvent"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlSetTimerEvent&amp;action=history"/>
	<updated>2026-10-25T11:08:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.osgrid.org/index.php?title=LlSetTimerEvent&amp;diff=178&amp;oldid=prev</id>
		<title>Osgridadmin: Created page with &quot;==Function: llSetTimerEvent(float sec );== Sets the timer event to be triggered every &#039;&#039;&#039;sec&#039;&#039;&#039; seconds. Passing &#039;&#039;&#039;0.0&#039;&#039;&#039; (or just 0) stops further timer events.&lt;br&gt;&lt;br&gt;...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlSetTimerEvent&amp;diff=178&amp;oldid=prev"/>
		<updated>2017-12-31T23:10:02Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Function: llSetTimerEvent(float sec );== Sets the &lt;a href=&quot;/index.php?title=Timer&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Timer (page does not exist)&quot;&gt;timer&lt;/a&gt; event to be triggered every &amp;#039;&amp;#039;&amp;#039;sec&amp;#039;&amp;#039;&amp;#039; seconds. Passing &amp;#039;&amp;#039;&amp;#039;0.0&amp;#039;&amp;#039;&amp;#039; (or just 0) stops further timer events.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Function: llSetTimerEvent(float sec );==&lt;br /&gt;
Sets the [[timer]] event to be triggered every &amp;#039;&amp;#039;&amp;#039;sec&amp;#039;&amp;#039;&amp;#039; seconds. Passing &amp;#039;&amp;#039;&amp;#039;0.0&amp;#039;&amp;#039;&amp;#039; (or just 0) stops further timer events.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The timer persists over state changes, but gets removed when the script is reset. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Caveats&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;OpenSimulator Differences&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
•  	In OpenSimulator the timer period is hard limited to no smaller than 0.5 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
•  	This can be changed by setting ScriptDelayFactor to a value less than 1.0 in the XEngine section of the ini file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
•  	In SL several sources suggest that timer periods of [[http://http://lslwiki.net/lslwiki/wakka.php?wakka=llSetTimerEvent 0.04]] or [[http://community.secondlife.com/t5/LSL-Scripting/quot-on-mouselook-quot/m-p/768291#M545 0.02]] are possible.&amp;lt;br&amp;gt;&lt;br /&gt;
•  	But actual measurements show that time periods below 0.20 seconds are never achieved on SL. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetTimerEvent(300); // five minutes: 5*60--no need to make LSL do this simple calculation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    timer()&lt;br /&gt;
    {&lt;br /&gt;
        llOwnerSay(&amp;quot;timeout&amp;quot;);&lt;br /&gt;
//      llSetTimerEvent(0);   (to stop the timer)&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Calling llSetTimerEvent replaces any existing timer value, and resets the countdown. In other words, if you call llSetTimerEvent(n) every n-1 seconds, the timer() event will never fire.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop the timer, call llSetTimerEvent(0.0). It&amp;#039;s good practice to do this in the state_exit() event of any state which uses a timer to avoid unintentionally having a timer running in the next state.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See Also&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Events:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[timer]] 	– 	event called every sec seconds &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>