This commit is contained in:
aozhiwei 2022-09-21 15:05:51 +08:00
parent e7124714ae
commit 4e4b3e5359

View File

@ -10,16 +10,24 @@ class Fragment {
async start() { async start() {
while (true) { while (true) {
await this.alloc(utils.getUtcTime());
const nowTime = utils.getUtcTime(); const nowTime = utils.getUtcTime();
const daySeconds = utils.getDaySeconds(nowTime, constant.TIME_ZONE); const daySeconds = utils.getDaySeconds(nowTime, constant.TIME_ZONE);
const hourSeconds = utils.getHourSeconds(nowTime, constant.TIME_ZONE); const hourSeconds = utils.getHourSeconds(nowTime, constant.TIME_ZONE);
let sleepTime = 3600 + 10; const sleepTime = 3600 + 10;
await utils.sleep(sleepTime * 1000); await utils.sleep(sleepTime * 1000);
} }
} }
async alloc(nowTime) { async alloc(nowTime) {
try {
const daySeconds = utils.getDaySeconds(nowTime, constant.TIME_ZONE);
const hourSeconds = utils.getHourSeconds(nowTime, constant.TIME_ZONE);
} catch (err) {
}
} }
} }