mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 06:00:21 +01:00
parent
0c1076c917
commit
01c07d120f
1 changed files with 2 additions and 2 deletions
|
@ -1,10 +1,10 @@
|
|||
// AID
|
||||
// 長さ8の[2000年1月1日からの経過ミリ秒をbase36でエンコードしたもの] + 長さ2の[ノイズ文字列]
|
||||
|
||||
import * as cluster from 'cluster';
|
||||
import * as crypto from 'crypto';
|
||||
|
||||
const TIME2000 = 946684800000;
|
||||
let counter = process.pid + (cluster.isMaster ? 0 : cluster.worker.id);
|
||||
let counter = crypto.randomBytes(2).readUInt16LE(0);
|
||||
|
||||
function getTime(time: number) {
|
||||
time = time - TIME2000;
|
||||
|
|
Loading…
Reference in a new issue