compat: Add a 'usleep' shim for Mes.

* gash/compat.scm [mes] (usleep): New procedure.
This commit is contained in:
Timothy Sample 2022-12-22 13:34:02 -06:00
parent 88dfac30c3
commit 00c794c9a6
1 changed files with 8 additions and 0 deletions

View File

@ -108,6 +108,7 @@
thunk?
EXIT_SUCCESS
EXIT_FAILURE
usleep
exact?
exact-integer?
set-program-arguments
@ -253,6 +254,13 @@
(define EXIT_SUCCESS 0)
(define EXIT_FAILURE 1)
;; Mes doesn't have sleep, so we just spin the tires a bit.
(define (usleep n)
(let loop ((n n))
(if (<= n 0)
#t
(loop (- n 1)))))
;; Mes only has exact integers.
(define exact? integer?)
(define exact-integer? integer?)