llGetTimeOfDay
function
Function syntax
float llGetTimeOfDay();- Returns
float- Energy
- 10
By default (without custom environment settings), Second Life day cycles are 4 hours long, but can be configured to anywhere between 4 and 168 hours long.
Returns a float that is the time in seconds with sub-second precision since Second Life midnight (per the parcel-scoped day cycle settings).
float result = llGetTimeOfDay();Examples
Section titled “Examples”Example 1
default{ touch_start(integer total_number) { float tod = llGetTimeOfDay( ); llOwnerSay("Time since midnight on current parcel:"); integer hours = ((integer)tod / 3600) ; integer minutes = ((integer)tod / 60) - (hours * 60); llOwnerSay((string) tod + " seconds which is "+(string) hours+"h "+(string) minutes+"m"); }}See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.