Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,22 @@
(do ;;; Time a function
(fn time-function [fn-to=be-timed]
(local start-time (os.clock))
(fn-to=be-timed)
(- (os.clock) start-time) ;;; execution time in seconds
)
(fn delay [delta-t]
(local end-time (+ (os.clock) delta-t))
(while (< (os.clock) end-time)
(var x 0)
(for [i 1 100_000] (set x (+ x 1)))
)
)
(fn test-fn []
(delay 1.234) ; sleep 1.234 seconds
)
(print (time-function test-fn " seconds"))
)