From 17656bfe7346bfb1c948e3c82d9960b5a795621f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 10 Oct 2024 16:05:15 -0700 Subject: follow counts --- lib/utils.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/utils.ts') diff --git a/lib/utils.ts b/lib/utils.ts index a805f343..7bcb4a3d 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -168,3 +168,14 @@ export function formatReceipt(items, currency) { } export let t = ({ language = "en" }) => locales[language]; + +export let time = (() => { + let count = 0, started = false; + return () => { + if (!started) { + console.time(''); + started = true; + } + console.timeLog('', ++count); + }; +})(); -- cgit v1.2.3