Artifact 38939cff959cb15b6757860b6586a283fdf8ffb9309b3f5ebdfc821769fa77c0:
- File
psl-1983/3-1/nmode/wait.sl
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1163) [annotate] [blame] [check-ins using] [more...]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Wait.SL - Wait Primitive (TOPS-20 Version) % % Author: Alan Snyder % Hewlett-Packard/CRC % Date: 23 September 1982 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 19-June-1983 Mark R. Swanson % Changed timeout-wait to accept a third argument: a list of args for F, its % first arg. This routine is nearly identical to WAIT-TIMEOUT, found in % P20U:WAIT.SL and could replace it if calls on WAIT-TIMEOUT are converted to % three args. (CompileTime (load fast-int)) (BothTimes (load jsys)) (de timeout-wait (f args n-60ths) % Return when either of two conditions are met: (1) The function F (of no % arguments) returns non-NIL; (2) The specified elapsed time (in units of % 1/60th second) has elapsed. Don't waste CPU cycles! Return the last % value returned by F (which is always invoked at least once). (let (result) (while (and (not (setf result (apply f args))) (> n-60ths 0)) (Jsys0 250 0 0 0 (const jsDISMS)) (setf n-60ths (- n-60ths 15)) ) result ))