26 lines
490 B
TypeScript
26 lines
490 B
TypeScript
// Metro module 1367 (f1368).
|
|
export class TaskRunner {
|
|
constructor() {
|
|
return {
|
|
__proto__: new.target.prototype,
|
|
timeoutId: null
|
|
};
|
|
}
|
|
schedule(c12990_0, a1) {
|
|
this.unschedule();
|
|
this.timeoutId = setTimeout(() => {
|
|
this.timeoutId = null;
|
|
c12990_0();
|
|
}, a1);
|
|
}
|
|
unschedule() {
|
|
if (this.scheduled()) {
|
|
clearTimeout(this.timeoutId);
|
|
this.timeoutId = null;
|
|
}
|
|
}
|
|
scheduled() {
|
|
return this.timeoutId !== null;
|
|
}
|
|
}
|