Posted by member 212670 on 2006-04-27 20:44:54 link
Ahh good point.
I changed it a bit (no lslua.milli needed). See anything wrong with this? Testing shows it's accurate (arg is in milliseconds):
I changed it a bit (no lslua.milli needed). See anything wrong with this? Testing shows it's accurate (arg is in milliseconds):
function pauseit (arg)
local start = os.clock ()
local finish = start + tonumber (arg)/1000
while start < finish do
start = os.clock() + .001
end
end
local start = os.clock ()
local finish = start + tonumber (arg)/1000
while start < finish do
start = os.clock() + .001
end
end