TimerDiff

首页  后退  前进

TimerDiff
down2

TimerDiff

返回调用 TimerInit() 的时间间隔.

 

TimerDiff ( handle )

参数

handle

之前调用 TimerInit() 返回的句柄.

返回值

返回当前与之前调用 TimerInit() 之间的时间间隔(毫秒).

备注

已知有些处理器会导致该函数返回不正确的结果.

 

函数示例

#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

参见:

TimerInit

例子
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