count_secondscount_secondsCountSecondsCountSecondscount_seconds (算子)
名称
count_secondscount_secondsCountSecondsCountSecondscount_seconds — 流逝的时间。
签名
Herror count_seconds(double* Seconds)
Herror T_count_seconds(Htuple* Seconds)
void CountSeconds(HTuple* Seconds)
static double HSystem::CountSeconds()
def count_seconds() -> float
描述
算子 count_secondscount_secondsCountSecondsCountSecondsCountSecondscount_seconds helps to measure time. Each
operator call returns a time value. The difference of the values of
two successive calls provides the time interval in seconds.
The mode of measuring time can be set with
set_system('clock_mode',...)set_system("clock_mode",...)SetSystem("clock_mode",...)SetSystem("clock_mode",...)SetSystem("clock_mode",...)set_system("clock_mode",...)。
注意
The time measurement is not exact and depends on the load of the computer.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
SecondsSecondsSecondsSecondssecondsseconds (输出控制) real → HTuplefloatHTupleHtuple (real) (double) (double) (double)
Process time since the program start.
示例(HDevelop)
count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start
示例(C)
count_seconds(&Start);
/* program segment to be measured */
count_seconds(&End);
printf("RunTime = %g\n",End-Start);
示例(HDevelop)
count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start
示例(HDevelop)
count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start
示例(HDevelop)
count_seconds(Start)
* program segment to be measured
count_seconds(End)
Seconds := End - Start
结果
算子 count_secondscount_secondsCountSecondsCountSecondsCountSecondscount_seconds 始终返回值 2 ( H_MSG_TRUE )。
另见
set_systemset_systemSetSystemSetSystemSetSystemset_system
模块
基础