mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
add helper function for getting device time
This commit is contained in:
parent
e2d2ab7cf8
commit
6e4696679e
2 changed files with 33 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue