Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function generateHexTimeStamp() {
- let length = 8
- let currentSecond = Date.now()/1000;
- let timestamp = parseInt(currentSecond, 10) % 0xFFFFFFFF;
- timestamp = timestamp.toString(16);
- return (timestamp.length===length)? timestamp : "00000000".substring(timestamp.length, length) + timestamp;
- }
Add Comment
Please, Sign In to add comment