Don't click here unless you want to be banned.

LSL Wiki : llGetTime

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
float llGetTime()

Gets the time in seconds since the last script reset, or since the time was last reset using llResetTime or llGetAndResetTime. It has been reported that it can also reset when the server reboots or other unusual events. Because of this, it works best for measuring short intervals (e.g. "Has it been over three seconds since I was last clicked?"), and may be unreliable over long intervals (e.g. "Has is been over three days since I was last clicked?").

Note: llGetTime, llGetTimeOfDay, llGetWallclock, and llGetGMTclock do different things.

The following script reports the script's lifetime each time the object is touched:
    touch_start( integer total_number )
        float lifetime = llGetTime();
        llWhisper( 0, "This script has been running for " 
                      + (string)lifetime 
                      + " seconds" );

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Time
Comments [Hide comments/form]
Dont be so sure of this ;)

I think llGetTime() actually reports the time in seconds since the script calling llGetTime() was last reset. (Or the time since it was reset using llResetTime()).
-- ChristopherOmega (2004-01-15 21:47:47)
I think this page gives llGetTime() a raw deal. It may reset on a sim crossing (I haven't tested), but I don't think it just resents randomly at the whim of the server. These functions are most definitely very useful for timing in real-time scripts, such as scripts that deal with physics. I've used llGetAndResetTime() a lot in my projects with no ill effects or weird behaviors that would be indicative of the time being reset at random.
-- LexNeva (2007-01-14 12:58:34)
Good to know Lex. I got scared by this page and used llGetUNIXTime instead :)
-- SeifertSurface (2007-01-22 02:18:01)
Agree with the above -- this particular function performs flawlessly in many scripts I use daily. I'm editing out the ridiculous statements (e.g. "Basically, don't use this function for anything!").
-- GaiusGoodliffe (2007-05-20 22:29:17)
Attach a comment to this page: