Template:Needs Translation/
函数名
|
Function: float llGetTimeOfDay( );
|
参数:无
|
返回值:返回一个浮点数,该浮点数是自 second life midnight 或 region up-time (从该区域联机 / 重新引导以来的时间)以秒为单位的时间,精度为亚秒; 以较小者为准。 如果区域配置为太阳保持恒定位置,则返回的值为区域升温时间。
|
注意事项
|
All Issues ~ Search JIRA for related Bugs
|
示例
|
示例一
//Time will be less than 4 hours unless the sun is locked.
default
{
touch_start(integer total_number)
{
float tod = llGetTimeOfDay( );
llOwnerSay("Time since last region restart or SL midnight (based on SL 4 hour day):");
integer hours = ((integer)tod / 3600) ;
integer minutes = ((integer)tod / 60) - (hours * 60);
llOwnerSay((string) tod + " seconds which is "+(string) hours+"h "+(string) minutes+"m");
}
}
|