Difference between revisions of "LlGetAndResetTime"

From Second Life Wiki
Jump to navigation Jump to search
m (formatted example)
(*guess* it's affected by SVC-3293 as well)
Line 1: Line 1:
{{LSL_Function
{{Issues/SVC-3293}}{{LSL_Function
|func_id=84
|func_id=84
|func_sleep=0.0
|func_sleep=0.0

Revision as of 11:44, 11 August 2009

Summary

Function: float llGetAndResetTime( );

Returns a float that is script time in seconds and then resets the script time to zero.

Specification

Script time differs from normal time, it is affected by time dilation. See llGetRegionTimeDilation for details.

Caveats

All Issues ~ Search JIRA for related Bugs

Examples

<lsl> 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." );
   }

}

</lsl>

Notes

Script time does not measure time dilation. To measure elapsed calendar time, call llGetTimestamp instead, since time dilation and resets often make dilated time intervals differ from calendar time intervals.

See Also

Functions

•  llResetTime
•  llGetTime
•  llGetRegionTimeDilation

Deep Notes

All Issues

~ Search JIRA for related Issues
   llGetTime doesn't reset on admin requested sim restart

Signature

function float llGetAndResetTime();