MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / _get_seconds

Method _get_seconds

modules/drivers/rtc/rv3028.js:41–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 }
40
41 _get_seconds() {
42 this.block = super.readBlock(RV3028_UNIX, 4);
43 this.unixTime = (this.block[3] << 24) | (this.block[2] << 16) | (this.block[1] << 8) | this.block[0];
44//trace(`block[3-0]: ${this.block[3]}, ${this.block[2]}, ${this.block[1]}, ${this.block[0]} - unixTime: ${this.unixTime}\n`);
45 return this.unixTime;
46 }
47
48 set seconds(v) {
49 let buf = new ArrayBuffer(4*1);

Callers 1

secondsMethod · 0.95

Calls 1

readBlockMethod · 0.45

Tested by

no test coverage detected