MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / get

Method get

projects/JavaScript/proto/fbe.js:4236–4243  ·  view source on GitHub ↗

* Get the timestamp value * @this {!FieldModelTimestamp} * @returns {!object} Result timestamp value and its size

()

Source from the content-addressed store, hash-verified

4234 * @returns {!object} Result timestamp value and its size
4235 */
4236 get () {
4237 if ((this._buffer.offset + this.fbeOffset + this.fbeSize) > this._buffer.size) {
4238 return { value: new Date(0), size: 0 }
4239 }
4240
4241 let nanoseconds = this.readUInt64(this.fbeOffset)
4242 return { value: new Date(Math.round(nanoseconds / 1000000)), size: this.fbeSize }
4243 }
4244
4245 /**
4246 * Set the timestamp value

Callers

nothing calls this directly

Calls 1

readUInt64Method · 0.45

Tested by

no test coverage detected