summaryrefslogtreecommitdiff
path: root/lib/utils.fnl
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-10-16 22:42:28 +0600
committerunwox <me@unwox.com>2024-10-16 22:43:17 +0600
commit4bd78ced2b84f9f4c851a8fdb872bc318a296221 (patch)
tree66ff7fd19f217b5e4ceb9fda31f79f572fea3664 /lib/utils.fnl
parentfd9a559475ac6bff7c82594dc313d762ab807592 (diff)
fix artoftea parsing
Diffstat (limited to 'lib/utils.fnl')
-rw-r--r--lib/utils.fnl8
1 files changed, 7 insertions, 1 deletions
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}