mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-09 07:09:57 +03:00
I spelt Milliseconds wrong...
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import t from "tap";
|
||||
import { GetMilisecondsSince, IsValidURL } from "./misc";
|
||||
import { GetMillisecondsSince, IsValidURL } from "./misc";
|
||||
|
||||
t.test("#GetMilisecondsSince", (t) => {
|
||||
const time = GetMilisecondsSince(10n);
|
||||
t.test("#GetMillisecondssSince", (t) => {
|
||||
const time = GetMillisecondsSince(10n);
|
||||
t.ok(typeof time === "number" && time > 0, "Should return a number greater than 0.");
|
||||
|
||||
t.end();
|
||||
|
||||
@@ -18,10 +18,10 @@ export function EscapeStringRegexp(string: string) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a process.hrtime.bigint(), and returns the miliseconds elapsed since it.
|
||||
* Takes a process.hrtime.bigint(), and returns the millisecondss 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) {
|
||||
export function GetMillisecondsSince(ref: bigint) {
|
||||
return Number(process.hrtime.bigint() - ref) / 1e6;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user