std-sleep


Synopsis

(std-sleep <seconds>)

Description

STD-SLEEP stops execution for some seconds, does nothing but waiting and using about 100% CPU time.

It uses AutoCAD's DATE or a internal milliseconds timer. This is only approximate to +- 10 ms, dependent on the lisp, OS and hardware system , but not exact.

Beware that with a number greater than 1 no events (keyboard or mouse) are processed so far, on some systems even <Ctrl-Break> may be disabled.

The usage is mainly for some DCL or graphics animations and the function is provided to ensure some kind of standard how to process pending events while sleeping, and not to collect too much memory while looping. (esp. on VL)

Example

(std-sleep 0.2) ; waits for 20 milliseconds

Arguments

seconds: a real or integer number

Return Value

Nil.

Side Effects

This function is only called because of its side-effects.

It halts the system for a certain number of seconds or (preferred) fractional parts of seconds.

Module

(std-require 'STDTIME)

Defined in STDTIME