Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Time and Date > realtimeinit

realtimeinit

時間の単位を設定

realtime

日付の原点を設定または指定日付まで待つ

呼び出し手順

realtimeinit(time_unit)
realtime(t)

パラメータ

time_unit

実数. realtime の引数に関連する秒数

t

実数. 日付

説明

これら2つの関数はScilabで実時間を処理する際に使用できます.

realtimeinit(time_unit) は, realtime の引数 tに 関する時間の単位を定義します.

realtime(t0)を最初にコールした際, カレントの日付がt0に設定されます. これ以降のコールrealtime(t)では, 日付tに達するまで待機します.

realtimeinit(1/2);//時間の単位を 0.5秒に設定s
realtime(0);// カレントの時刻を 0に設定
for k=1:10
  realtime(k);
  mprintf('current time is '+string(k/2)+'sec .\r\n');
end

//次の命令では2秒毎にドットを出力
realtimeinit(2);
realtime(0);
for k=1:10
  realtime(k);
  mprintf('.\r\n');
end

realtimeinit(1);
realtime(0);
dt=getdate('s');
realtime(10);
getdate('s')-dt
realtimeinit(1);
realtime(0);
t1 = now()
datevec(t1)
realtime(10);
t1 = now()
datevec(t1)

参照

  • getdate — 日付と時間に関する情報を取得
Report an issue
<< now Time and Date sleep >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:40:36 CEST 2012