I spelt Milliseconds wrong...

This commit is contained in:
zkldi
2021-11-11 02:01:34 +00:00
parent 996d14519a
commit c313f21aef
10 changed files with 34 additions and 34 deletions
+3 -3
View File
@@ -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();
+2 -2
View File
@@ -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;
}