Skip to content

Commit 438a405

Browse files
committed
Schedule message 10 seconds in advance
1 parent 4be4d77 commit 438a405

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

controller/dist/App.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controller/dist/App.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

controller/src/App.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class App {
5050

5151
public async syncClock(devID: string): Promise<void> {
5252
let now = new Date()
53-
let target = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(),
54-
now.getMinutes() + (now.getSeconds() <= 50 ? 1 : 2),
53+
let target = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(),
54+
now.getSeconds() + 10,
5555
)
5656
let unixTime = target.getTime() / 1000
5757
console.log(`sync clock ${devID}: now = ${now.toJSON()}; `

0 commit comments

Comments
 (0)