clearTimeout

Declaration

void clearTimeout(int handle);

Description

Cancel the delay call operation set previously. The parameter handle is the return value from the previous setTimeout.

local iDelayExecute = setTimeout(function()
  print("This log will be printed in 3 seconds");
end,3000);

-- you can cancle it use clearTimeout
clearTimeout(iDelayExecute);