1 Commits

Author SHA1 Message Date
1816a43f14 Fix native-image error with Thread/sleep 2026-02-05 23:26:01 +01:00

View File

@@ -10,7 +10,7 @@
(loop [iteration 1] (loop [iteration 1]
(command) (command)
(when (or (nil? max) (< max 0) (and max (< iteration max))) (when (or (nil? max) (< max 0) (and max (< iteration max)))
(Thread/sleep (* 1000 interval)) (Thread/sleep ^long (* 1000 interval))
(recur (inc iteration)))))) (recur (inc iteration))))))
@@ -23,6 +23,6 @@
(comment (comment
(time (run-every (fn [] (println "Hello")) 2 3)) (time (run-every (fn [] (println "Hello")) 2 3))
(time (run-every (fn [] (println "Hello")) 2)) ;;(time (run-every (fn [] (println "Hello")) 2)) ;; Runs forever
(time (run-every-non-blocking (fn [] (println "Hello")) 2 3)) (time (run-every-non-blocking (fn [] (println "Hello")) 2 3))
) )