Difference between revisions of "LlGetUnixTime"

From Second Life Wiki
Jump to navigation Jump to search
m (link typo correction)
Line 1: Line 1:
{{LSL_Function
{{Issues/SVC-6357}}{{LSL_Function
|func_id=316|func_sleep=0.0|func_energy=10.0
|func_id=316|func_sleep=0.0|func_energy=10.0
|sort=GetUnixTime|func=llGetUnixTime|return_type=integer
|sort=GetUnixTime|func=llGetUnixTime|return_type=integer

Revision as of 04:54, 9 October 2010

Summary

Function: integer llGetUnixTime( );

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

Examples

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

}

</lsl>

Useful Snippets

Helper Functions

See Also

Functions

•  llGetTimestamp Human Readable UTC Date and time
•  llGetDate Human Readable UTC Date
•  llGetTime Elapsed script-time.

Deep Notes

All Issues

~ Search JIRA for related Issues
   llGetUnixTimeNanos() - greater precision timing mechanism

Tests

•  llGetUnixTime Conformance Test

Signature

function integer llGetUnixTime();