timeEvent=object:extend() function timeEvent:new(i,func, recurring) self.i=i -- either period or counter, depending on recurring this.func=func this.recurring=recurring or false end function timeEvent:update() if this.recurring else end end