add helper function for getting device time

This commit is contained in:
liamcottle 2025-02-15 22:18:39 +13:00
parent e2d2ab7cf8
commit 6e4696679e
2 changed files with 33 additions and 1 deletions

View file

@ -250,7 +250,8 @@
console.log(this.contacts);
},
async sendCommandGetDeviceTime() {
await this.connection.sendCommandGetDeviceTime();
const deviceTime = await this.connection.getDeviceTime();
console.log(deviceTime);
},
async sendCommandSetDeviceTime() {
const timestamp = Math.floor(Date.now() / 1000);