LlGetTime/ja - Second Life Wiki

LlGetTime/ja

From Second Life Wiki

Jump to: navigation, search

関数: float llGetTime( );

最後のSimリセットから、スクリプトリセットあるいはllResetTimellGetAndResetTimeのいずれかの呼び出しまでの、秒単位でのスクリプト時間のfloat値を返します。


仕様

スクリプト時間が通常時間とは異なり、時間拡張によって作用されています。詳細についてはllGetRegionTimeDilationを見ましょう。

警告

  • スクリプト時間がリセットされるのは以下のケースです。
  • スクリプト時間は現実時間を基準にしておらず、時間拡張によって作用されます。

 
default {
    state_entry()
    {
        llResetTime();
    }
    touch_start(integer num_touch)
    {
        float time = llGetTime(); //Instead getting, and then resetting the time, we could use llGetAndReset() to accomplish the same thing.
        llResetTime();
        llSay(0,(string)time + " seconds have elapsed since the last touch." );
    }
}
 

ノート

スクリプト時間は時間遅延を基準にしていません。 カレンダー時間の経過を基準にするには、時間拡張からカレンダー時間間隔による拡張時間間隔の差異を初期化し、代わりにllGetTimestampを呼び出します。

関連項目