diff --git a/racket/src/ChezScheme/release_notes/release_notes.stex b/racket/src/ChezScheme/release_notes/release_notes.stex index c647c855d3..2e11fbe088 100644 --- a/racket/src/ChezScheme/release_notes/release_notes.stex +++ b/racket/src/ChezScheme/release_notes/release_notes.stex @@ -1961,6 +1961,12 @@ in fasl files does not generally make sense. %----------------------------------------------------------------------------- \section{Bug Fixes}\label{section:bugfixes} +\subsection{\protect\scheme{sleep} with negative duration (9.5.5)} + +Prior to this release, \scheme{sleep} of a negative duration would +result in an infinite pause in Windows. Now \scheme{sleep} returns +immediately on all platforms when given a negative duration. + \subsection{Buffering signals (9.5.3)} Prior to this release, only one unhandled signal was buffered for diff --git a/racket/src/ChezScheme/s/7.ss b/racket/src/ChezScheme/s/7.ss index dc36eb20b1..8b639b9758 100644 --- a/racket/src/ChezScheme/s/7.ss +++ b/racket/src/ChezScheme/s/7.ss @@ -771,7 +771,9 @@ (lambda (t) (unless (and (time? t) (eq? (time-type t) 'time-duration)) ($oops who "~s is not a time record of type time-duration" t)) - (fp (time-second t) (time-nanosecond t))))) + (let ([s (time-second t)]) + (when (>= s 0) + (fp s (time-nanosecond t))))))) (define $scheme-greeting (lambda ()