Difference between revisions of "Stopwatch(float precision time)"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 2: Line 2:
|event_id
|event_id
|mode=request
|mode=request
|func_sleep
|func_energy
|event=stopwatch
|event=stopwatch
|p1_type=float
|p1_type=float
Line 9: Line 7:
|p1_desc=undefined
|p1_desc=undefined


|func_desc= stopwatch(float precision_time) Should work like timer() and react to llSetTimerEvent(float time), but with higer precision.
|event_desc= stopwatch(float precision_time) Should work like timer() and react to llSetTimerEvent(float time), but with higer precision.
|return_text
|return_text
|spec=current Timer which uses " [[timer()]] " does not work on milliseconds base, this new event state would. In the current timer event there is no high speed precision possible.  
|spec=current [[timer]] event does not work on milliseconds base, this new event state would. In the current timer event there is no high speed precision possible.  
|caveats=This new event would probably have to be executed client-side to work. Please comment! Maybe necessary to also implement llSetStopwatch(float milli_seconds) to trigger this event, and llSetStopwatch(0) to stop the event.
|caveats=This new event would probably have to be executed client-side to work. Please comment! Maybe necessary to also implement llSetStopwatch(float milli_seconds) to trigger this event, and llSetStopwatch(0) to stop the event.



Latest revision as of 11:53, 12 April 2009

Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.

Description

Event: stopwatch( float milli_seconds ){ ; }

stopwatch(float precision_time) Should work like timer() and react to llSetTimerEvent(float time), but with higer precision.

• float milli_seconds undefined

Specification

current timer event does not work on milliseconds base, this new event state would. In the current timer event there is no high speed precision possible.

Caveats

This new event would probably have to be executed client-side to work. Please comment! Maybe necessary to also implement llSetStopwatch(float milli_seconds) to trigger this event, and llSetStopwatch(0) to stop the event.


Examples

<lsl>float milliseconds; default {

   stopwatch(float precision_timer)
   {
       for (milliseconds=0; milliseconds < 10; milliseconds += 0.001)
       {
           llSay(0,"Time passed in milliseconds: " + (string)milliseconds));
       }
   }

}</lsl>

Deep Notes

Signature