fix: typo (#9300)
This commit is contained in:
parent
847f59369b
commit
020cd5cc02
2 changed files with 5 additions and 5 deletions
|
|
@ -6,14 +6,14 @@ import * as crypto from 'node:crypto';
|
|||
const TIME2000 = 946684800000;
|
||||
let counter = crypto.randomBytes(2).readUInt16LE(0);
|
||||
|
||||
function getTime(time: number) {
|
||||
function getTime(time: number): string {
|
||||
time = time - TIME2000;
|
||||
if (time < 0) time = 0;
|
||||
|
||||
return time.toString(36).padStart(8, '0');
|
||||
}
|
||||
|
||||
function getNoise() {
|
||||
function getNoise(): string {
|
||||
return counter.toString(36).padStart(2, '0').slice(-2);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue