Pinkishu

Untitled

May 26th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function utils.timeoutFunc(func,timeout, ...)
  2.     local start = os.clock()
  3.     while not func(...) do
  4.         if timeout == nil then
  5.             return false
  6.         elseif os.clock() > start + timeout then
  7.             return false
  8.         end
  9.     end
  10.     return true
  11. end
Advertisement
Add Comment
Please, Sign In to add comment