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

From Second Life Wiki
Jump to navigation Jump to search
m (link)
m
Line 15: Line 15:


|examples=
|examples=
<lsl>
<lsl>float milliseconds;
float milliseconds;
default
default
  {
{
  stopwatch(float precision_timer)
    stopwatch(float precision_timer)
    {
    {
      for (milliseconds==0;milliseconds<10;milliseconds +=0.001)
        for (milliseconds=0; milliseconds < 10; milliseconds += 0.001)
         {
         {
          llSay(0,"Time passed in milliseconds: " + (string)milliseconds));
            llSay(0,"Time passed in milliseconds: " + (string)milliseconds));
         }
         }
      }
    }
}
}</lsl>
</lsl>
 
|helpers
|helpers
|related
|related

Revision as of 04:40, 3 April 2008

   'event_desc' can not be undefined

(Please define a value for 'event_desc' to describe the events actions.)
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 ){ ; }

event_desc undefined

• float milli_seconds undefined

Specification

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.

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