“LlGetTimeOfDay”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: float llGetTimeOfDay( ); |参数= 参数:无 |返回值=…”) |
|||
| 第25行: | 第25行: | ||
} | } | ||
} | } | ||
| − | <pre> | + | </pre> |
2020年8月20日 (四) 10:13的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| 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");
}
}
|
| 相关函数 |
|---|
| llGetSunDirection |
| 相关事件 |
|---|
| 无 |