Difference between revisions of "LlGetUnixTime"
Jump to navigation
Jump to search
m |
Void Singer (talk | contribs) m (+ also functions, + helpers) |
||
Line 26: | Line 26: | ||
} | } | ||
</lsl> | </lsl> | ||
|helpers | |helpers= | ||
|also_functions | === Helper Functions === | ||
* [[User:Void_Singer/Functions#Unix_time_code_to_list_format|Timestamp: Unix timestamp to list format]] - ex: 1234567890 to [2009, 2, 13, 3, 31, 30] | |||
* [[User:Void_Singer/Functions#Weekday_from_Unix_timestamp|Timestamp: Weekday_from_Unix_timestamp]] - ex: "Friday" from 1234567890 | |||
|also_functions= | |||
{{LSL DefineRow||[[llGetTimeStamp]]|Human Readable UTC Date and time}} | |||
{{LSL DefineRow||[[llGetDate]]|Human Readable UTC Date}} | |||
{{LSL DefineRow||[[llGetTime]]|Elapsed script-time.}} | |||
|also_events | |also_events | ||
|also_tests={{LSL DefineRow||[[llGetUnixTime/test|llGetUnixTime Conformance Test]]|}} | |also_tests={{LSL DefineRow||[[llGetUnixTime/test|llGetUnixTime Conformance Test]]|}} |
Revision as of 07:40, 16 January 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: integer llGetUnixTime( );0.0 | Forced Delay |
10.0 | Energy |
Returns an integer that is the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock.
Caveats
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
- Timestamp: Unix timestamp to list format - ex: 1234567890 to [2009, 2, 13, 3, 31, 30]
- Timestamp: Weekday_from_Unix_timestamp - ex: "Friday" from 1234567890
See Also
Functions
• | llGetTimeStamp | – | Human Readable UTC Date and time | |
• | llGetDate | – | Human Readable UTC Date | |
• | llGetTime | – | Elapsed script-time. |