Files
fastmovieai/fastmovie-vue/src/common/time/TimeoutTask.ts
T

14 lines
257 B
TypeScript
Raw Normal View History

export class TimeoutTask implements TimeTask {
cancelled = false;
constructor(
public nextTime: number,
private cb: (now: number) => void
) {}
run(now: number) {
this.cb(now);
this.cancelled = true;
}
}