Skip to content

Commit

Permalink
fix: 修复开盘后不会自己唤醒更新的问题
Browse files Browse the repository at this point in the history
- 减小 timer 的睡眠间隔,进行多次睡眠
  • Loading branch information
arrebole committed Sep 26, 2023
1 parent 612bc7e commit 288437f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import Configuration from './configuration';

class Timer {
async await() {
// 工作日工作时间 9:00-11.30 13:00-15:00
if (this.isWorkDay() && this.isWorkTime()) {
return await this.sleep(Configuration.getUpdateInterval());
}
while (true) {
await this.sleep(Configuration.getUpdateInterval());

// 周末一直是睡眠
await this.sleep(60 * 60 * 1000);
await this.await();
// 工作日工作时间 9:00-11.30 13:00-15:00
if (this.isWorkDay() && this.isWorkTime()) {
return true

Check failure on line 10 in src/timer.ts

View workflow job for this annotation

GitHub Actions / lint (16.x)

Insert `;`
}
}
}

/**
Expand Down

0 comments on commit 288437f

Please sign in to comment.