From 4bd78ced2b84f9f4c851a8fdb872bc318a296221 Mon Sep 17 00:00:00 2001 From: unwox Date: Wed, 16 Oct 2024 22:42:28 +0600 Subject: fix artoftea parsing --- lib/utils.fnl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/utils.fnl b/lib/utils.fnl index 3220952..fcc235c 100644 --- a/lib/utils.fnl +++ b/lib/utils.fnl @@ -2,4 +2,10 @@ (local (ok? result) ...) (if ok? result (error result))) -{: must} +(fn measure [what f] + (local start (luna.utf8.now)) + (local res (table.pack (f))) + (print (.. what ": " (/ (- (luna.utf8.now) start) 1e6))) + (values (table.unpack res))) + +{: must : measure} -- cgit v1.2.3