Merge branch 'master' into feat/forwards

This commit is contained in:
Cyber authored and GitHub committed 2025-12-18 22:05:12 +01:00
commit c984dbbd3f
3 files changed
+108 -65

No files matched your search

+7
View File
@@ -61,3 +61,10 @@ export async function timePromise<T>(fn: () => Promise<T>): Promise<{ result: T;
const elapsed = stopwatch.elapsed();
return { result, elapsed };
}
export function timeFunction<T>(fn: () => T): { result: T; elapsed: ElapsedTime } {
const stopwatch = Stopwatch.startNew();
const result = fn();
const elapsed = stopwatch.elapsed();
return { result, elapsed };
}