mirror of
https://github.com/jwetzell/psn-js.git
synced 2026-08-21 15:09:17 +00:00
remove binary-parsser lib dependency
This commit is contained in:
@@ -2,9 +2,6 @@ const chunk = require('../chunk');
|
||||
|
||||
module.exports = (timestamp) => {
|
||||
const buf = Buffer.alloc(8);
|
||||
const timestampHigh = timestamp.toString(2).padStart(64, '0').substring(0, 32);
|
||||
const timestampLow = timestamp.toString(2).padStart(64, '0').substring(32);
|
||||
buf.writeUInt32LE(parseInt(timestampLow, 2));
|
||||
buf.writeUInt32LE(parseInt(timestampHigh, 2), 4);
|
||||
buf.writeBigUInt64LE(BigInt(timestamp));
|
||||
return chunk(0x0006, buf, false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user