More random
This commit is contained in:
parent
f69a6e629b
commit
9c6c1243cf
@ -57,8 +57,9 @@ export class Scheduler {
|
||||
}
|
||||
|
||||
private createUniqTaskTimer(seconds: number, name: string, args: Args = {}) {
|
||||
this.scheduleUniqTask(name, args, timestamp() + seconds - 10);
|
||||
const firstDelay = around(seconds - 10, 0.2);
|
||||
const intervalTime = around(seconds, 0.2) * 1000;
|
||||
this.scheduleUniqTask(name, args, timestamp() + firstDelay);
|
||||
setInterval(() => this.scheduleUniqTask(name, args, timestamp()), intervalTime);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user