|
发表于 2007-2-1 16:07:05
|
显示全部楼层
原来如此~本来是想计量下Timer(0.000)的精度,但恐怕用timer本身作量度已经不行了吧?
[jass]function timer_count takes nothing returns nothing
set udg_Time_C=udg_Time_C+1
if udg_Time_C+1>100 then
call PauseTimer(GetExpiredTimer())
call msg("Timer(0.000) "+R2S(TimerGetElapsed(udg_T_Timer[1])-udg_Timer_Time))
set udg_Timer_Time=TimerGetElapsed(udg_T_Timer[1])
set udg_Time_C=0
endif
endfunction
function Trig_debugTimer_Actions takes nothing returns nothing
call TimerStart(udg_T_Timer[1],20,false,null)
call TriggerSleepAction(0)
call msg("TriggerSleep(0) "+R2S(TimerGetElapsed(udg_T_Timer[1])-udg_Timer_Time))
set udg_Timer_Time=TimerGetElapsed(udg_T_Timer[1])
call TimerStart(udg_T_Timer[2],0.000,true,function timer_count)
endfunction[/jass] |
|