Lightweight timer||doc135427

September 20, 2022


 Object:lightTimer(stack, time, func, ...) 
  • The class to which the function belongs:Object


Start a timer with custom error output content and return a function to stop the timer, and print the custom output when an exception occurs when executing the timer function.


  • When the object is destroyed, the remaining timers on the object will be destroyed and will not be executed again


Variable name type Description
stack string print message on error
time int time
func function timer execution function
any The timer execution function carries parameters

Value Returned

type Description
function stop timer function

special usage

usage withWorld.TimerSame.