函数参考


TimerDiff

返回当前与上一次调用TimerInit()之间的时间间隔.

TimerDiff ( 句柄 )

参数

句柄 上一次调用 TimerInit() 时得到的句柄.

返回值

返回当前与上一次调用TimerInit()之间的时间间隔(以毫秒为单位).

注意/说明

None.

相关

TimerInit

示例/演示


Local $hTimer = TimerInit() ; Begin the timer and store the handle in a variable.
Sleep(3000) ; Sleep for 3 seconds.
Local $iDiff = 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(4096,"时间差",$iDiff)