LlGetAndResetTime
Revision as of 03:27, 17 August 2007 by Strife Onizuka (talk | contribs) (Undo revision 28526 by Locke Traveler (Talk) affect is emotional, effect is physical)
{{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 }}