TimerInit

首页  后退  前进

TimerInit
down2

TimerInit

返回可以传递给 TimerDiff() 的句柄, 计算时间差异毫秒值.

 

TimerInit ( )

返回值

返回可以传递给 TimerDiff() 的句柄,以毫秒为单位计算时间差异.

备注

TimerInit() 的返回值应该被视为一个难理解的句柄, 并且只用于传递给 TimerDiff().

任何其它用途的返回值将是一个潜在的错误.

 

函数示例

#include <MsgBoxConstants.au3>
Local $hTimer = TimerInit() ; Begin the timer and store the handle in a variable.
Sleep(3000) ; Sleep for 3 seconds.
Local $fDiff = TimerDiff($hTimer) ; Find the difference in time from the previous call of TimerInit. The variable we stored the TimerInit handlem is passed as the "handle" to TimerDiff.
MsgBox($MB_SYSTEMMODAL, "Time Difference", $fDiff)

----------------------------------------

 

该函数可以通过命令调用 exect

参见:

TimerDiff

例子
copy

$var_timer=TimerInit() ;; 启动定时器并将句柄存储在变量中

Sleep(3000)

$var_diff=TimerDiff($var_timer) ;; 返回与之前运行的TimerInit的时间差,TimerInit的句柄在变量中指定

 

exect=$var_hh=TimerInit()||Sleep(2000)||$var_nn=TimerDiff($var_hh) GLOBALEXECT<a> ;; 一个例子显示了命令多少时间

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru