#include <Timers.au3>
Global $iTimeInit, $iTimeUdfInit, $iTimeDiff, $iTimeUdfDiff, $iCheck
$i_T = TimerInit()
TimerDiff($i_T)
$i_T_Udf = _Timer_Init()
_Timer_Diff($i_T_Udf)
For $i = 1 To 10
$iCheck = TimerInit()
$i_T = TimerInit()
$iTimeInit += TimerDiff($iCheck)
$iCheck = TimerInit()
$i_T_Udf = _Timer_Init()
$iTimeUdfInit += TimerDiff($iCheck)
Sleep(50)
$iCheck = TimerInit()
TimerDiff($i_T)
$iTimeDiff += TimerDiff($iCheck)
$iCheck = TimerInit()
_Timer_Diff($i_T_Udf)
$iTimeUdfDiff += TimerDiff($iCheck)
Next
$iTimeInit /= 10
$iTimeUdfInit /= 10
$iTimeDiff /= 10
$iTimeUdfDiff /= 10
ConsoleWrite('Not UDF Init:' & @TAB & $iTimeInit & @LF)
ConsoleWrite('With UDF Init:' & @TAB & $iTimeUdfInit & @LF)
ConsoleWrite('Result Init: ' & @TAB & $iTimeUdfInit / $iTimeInit & @LF)
ConsoleWrite('---' & @LF)
ConsoleWrite('Not UDF Diff:' & @TAB & $iTimeDiff & @LF)
ConsoleWrite('With UDF Diff:' & @TAB & $iTimeUdfDiff & @LF)
ConsoleWrite('Result Diff: ' & @TAB & $iTimeUdfDiff / $iTimeDiff & @LF)