setInterval

Declaration

int setInterval(Action callback);

Description

Provide the ability to call specified functions based on time intervals.

local iInterval = setInterval(function()
    print("log ervery seconds.");
end,1000);

-- cancle the interval call
clearInterval(iInterval);