ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   25 Environment   25.2 Dictionary of Environment

25.2.4 sleep Function

sleep seconds    nil

Arguments and Values:
seconds - a non-negative real.

Causes execution to cease and become dormant for approximately the seconds of real time indicated by seconds, whereupon execution is resumed.

 (sleep 1)   NIL 

;; Actually, since SLEEP is permitted to use approximate timing, 
;; this might not always yield true, but it will often enough that
;; we felt it to be a productive example of the intent.
 (let ((then (get-universal-time))
       (now  (progn (sleep 10) (get-universal-time))))
   (>= (- now then) 10))

Side Effects:
Causes processing to pause.

Affected By:
The granularity of the scheduler.

Exceptional Situations:
Should signal an error of type type-error if seconds is not a non-negative real.

Allegro CL Implementation Details:

Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25