Difference between revisions of "LlGetUnixTime"

From Second Life Wiki
Jump to navigation Jump to search
(EX)
Line 8: Line 8:
|caveats=*{{Wikipedia|Year_2038_problem}}
|caveats=*{{Wikipedia|Year_2038_problem}}
|constants
|constants
|examples
|examples=<pre>
// Reset tracker
integer BOOT_TIME;
default
{
    state_entry()
    {
        BOOT_TIME = llGetUnixTime();
        llSetTimerEvent(0.1);
    }
   
    timer()
    {
        llSetText((string)(llGetUnixTime() - BOOT_TIME) + " Seconds since boot.\n\n ", <1,0,0>, 1.0);
        llSetTimerEvent(1);
    }
}
</pre>
|helpers
|helpers
|also_functions
|also_functions

Revision as of 16:38, 17 May 2007

Summary

Function: integer llGetUnixTime( );

Returns an integer that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock.

Examples

// Reset tracker
integer BOOT_TIME;
default
{
    state_entry()
    {
        BOOT_TIME = llGetUnixTime(); 
        llSetTimerEvent(0.1);
    }
    
    timer()
    {
        llSetText((string)(llGetUnixTime() - BOOT_TIME) + " Seconds since boot.\n\n ", <1,0,0>, 1.0);
        llSetTimerEvent(1);
    }
}

Deep Notes

Search JIRA for related Issues

Tests

•  llGetUnixTime Conformance Test

Signature

function integer llGetUnixTime();