mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-07 06:18:03 +03:00
reduce file footprint even more
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Takes a process.hrtime.bigint(), and returns the miliseconds elapsed since it.
|
||||
* This function will not work if more than 100(ish) days have passed since the first reference.
|
||||
*/
|
||||
export function GetMilisecondsSince(ref: bigint) {
|
||||
return Number(process.hrtime.bigint() - ref) / 1e6;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import t from "tap";
|
||||
import { GetMilisecondsSince } from "./hrtime";
|
||||
import { GetMilisecondsSince } from "./util";
|
||||
|
||||
t.test("#GetMilisecondsSince", (t) => {
|
||||
const time = GetMilisecondsSince(10n);
|
||||
@@ -32,3 +32,11 @@ export function ParseEA3SoftID(ver: string) {
|
||||
ext: a[4],
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a process.hrtime.bigint(), and returns the miliseconds elapsed since it.
|
||||
* This function will not work if more than 100(ish) days have passed since the first reference.
|
||||
*/
|
||||
export function GetMilisecondsSince(ref: bigint) {
|
||||
return Number(process.hrtime.bigint() - ref) / 1e6;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ImportInputParser, KtLogger, ScorePlaytypeMap } from "../../types";
|
||||
import { ImportAllIterableData } from "./score-importing/score-importing";
|
||||
import { CreateImportLoggerAndID } from "./common/import-logger";
|
||||
import { CreateSessions } from "./sessions/sessions";
|
||||
import { GetMilisecondsSince } from "../../common/hrtime";
|
||||
import { GetMilisecondsSince } from "../../common/util";
|
||||
import { ProcessPBs } from "./pb/process-pbs";
|
||||
import { UpdateUsersGamePlaytypeStats } from "./user-game-stats/update-ugs";
|
||||
import db from "../../db/db";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import { GetMilisecondsSince } from "../../../../common/hrtime";
|
||||
import { GetMilisecondsSince } from "../../../../common/util";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import { MockMulterFile } from "../../../../test-utils/mock-multer";
|
||||
|
||||
Reference in New Issue
Block a user