blob: 405bf7288f0c99668aaa1fd846f0d1839cc24803 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
(fn must [...]
(local (ok? result) ...)
(if ok? result (error result)))
(fn measure [what f]
(local start (luna.utf8.now))
(local res (table.pack (f)))
(print (.. what ": " (/ (- (luna.time.now) start) 1e6)))
(values (table.unpack res)))
{: must : measure}
|