LlGetAndResetTime: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m Undo revision 28526 by Locke Traveler (Talk) affect is emotional, effect is physical |
||
| Line 26: | Line 26: | ||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llResetTime]]|}} | |also_functions={{LSL DefineRow||[[llResetTime]]|}} | ||
{{LSL DefineRow||[[llGetTime | {{LSL DefineRow||[[llGetTime[[|}} | ||
|also | |also | ||
|notes | |notes | ||
Revision as of 02:27, 17 August 2007
{{LSL_Function |func_id=84 |func_sleep=0.0 |func_energy=10.0 |func=llGetAndResetTime |sort=GetAndResetTime |return_type=float |return_text=time in seconds. |func_footnote=Retrieves the time in seconds since since the last script reset (or since the last call to llResetTime/llGetAndResetTime), then resets the time to zero. |spec |caveats=*Known to be reset by various events outside user control, such as sim resets. Reliable only for short term timing measurements.
- Effected by time dilation.
|examples=
default {
state_entry()
{
llResetTime();
}
touch_start(integer num_touch)
{
float time = llGetAndResetTime(); //This is equivalent to calling llGetTime(), then llResetTime()
llSay(0,(string)time + " seconds have elapsed since the last touch." );
}
}
|helpers |also_functions=|-style="vertical-align:top;" | style="color:gray;" |• | llResetTime | style="color:gray;" | | | {{LSL DefineRow||[[llGetTime[[|}} |also |notes |cat1=Time |cat2=Script |cat3 |cat4 }}