1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-25 19:05:03 +02:00
This commit is contained in:
syuilo
2026-06-28 10:06:04 +09:00
parent 48f676511c
commit c5951175ef
3 changed files with 687 additions and 665 deletions

View File

@@ -9,6 +9,10 @@ import { spawn } from 'node:child_process';
import { promises as fs } from 'node:fs';
import path from 'node:path';
export function sleep(ms: number) {
return new Promise(resolvePromise => setTimeout(resolvePromise, ms));
}
export function median(values: number[]) {
const sorted = values.toSorted((a, b) => a - b);
const center = Math.floor(sorted.length / 2);