Skip to content

Commit

Permalink
Address JDK 19 Thread/sleep Clojure interop (clj-commons#504)
Browse files Browse the repository at this point in the history
* Address JDK 19 Thread/sleep Clojure interop

JDK 19's Thread/sleep now also accepts a Duration.
Add a ^long type hint to remove this new ambiguity for Clojure interop.

Closes clj-commons#503

* docs: update change log
  • Loading branch information
lread authored and ageneau committed Aug 10, 2023
1 parent 4440409 commit 067c7a5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/etaoin/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2264,11 +2264,11 @@
~@body))

(defn wait
"Sleeps for N seconds."
([driver sec]
(wait sec))
([sec]
(Thread/sleep (* sec 1000))))
"Sleep for `seconds`."
(#_{:clj-kondo/ignore [:unused-binding]} [driver seconds]
(wait seconds))
([seconds]
(Thread/sleep ^long (* seconds 1000))))

(defmacro with-wait
"Executes the body waiting for n seconds before each form.
Expand Down

0 comments on commit 067c7a5

Please sign in to comment.