DelaySystem is a class that allows async call of DelayCallback after the set amount of time has passed.
this is how to create a DelayCallback
publicclassCustomCallback extends DelayCallback{//all the data that your Call function needsprivatelet myInt: Int32;publicfuncCall() {//custom function that i want to be called when the specified time has passedif this.myInt>1 {LogChannel(n"DEBUG", "Input is bigger than 1"); }else {LogChannel(n"DEBUG", "Input is smaller than 1"); } }publicstaticfuncCreate(inputInt: Int32) -> ref<CustomCallback> {//use this way to create your Callback class in one linelet self = new CustomCallback(); self.myInt = inputInt;return self; }}
and this is how you can use the DelaySystem to call the Callback function with a delay