setTimeout method
Implementation
@VoltronMethod(kFuncSetTimeout)
bool setTimeout(int timeOut, String callId, JSPromise promise) {
var timer = TimerTask(timeOut, false, callId, (task) {
promise.resolve("");
_timeInfo.remove(task);
});
_timeInfo[callId] = timer;
timer.start();
return true;
}