mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-25 00:49:16 +00:00
reuse fixed size DataViews
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import chunk from '../chunk';
|
||||
|
||||
const buf = new DataView(new ArrayBuffer(8));
|
||||
export default (timestamp: bigint): Uint8Array => {
|
||||
const buf = new DataView(new ArrayBuffer(8));
|
||||
buf.setBigUint64(0, BigInt(timestamp), true);
|
||||
return chunk(0x0006, new Uint8Array(buf.buffer), false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user