如果您希望在time-to-wait毫秒之后异步发生某些操作,则可以使用alarm-evt,如下所示:
(thread
(lambda ()
(sync (alarm-evt (+ (current-inexact-milliseconds) time-to-wait)))
.... do something here ....))
Run Code Online (Sandbox Code Playgroud)
根据你正在做的事情,Óscar的答案(timer%)可能会更方便.