Delay function
How to make a proper function of the delay?
function My_Delay(sec)
local My_currentTime=GetTime();
while ( My_currentTime+sec>GetTime() ) do
-- wait a 'sec' time
end
end
My_Delay(5) - Wow sleep on 5 sec., and are not supported any action
|