picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 3dfa9a93d5e28a6e73286a65fa74c36d701ff4ff
parent 3fddb576da4d1c9c1e86cb486f8052433d2ca30e
Author: Alexander Burger <abu@software-lab.de>
Date:   Wed, 17 Apr 2013 07:14:17 +0200

Absolute simulation timing
Diffstat:
Mmisc/rcsim.l | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/misc/rcsim.l b/misc/rcsim.l @@ -1,4 +1,4 @@ -# 14apr13abu +# 15apr13abu # (c) Software Lab. Alexander Burger ### RC Flight Simulator for 64-bit PicoLisp ### @@ -455,8 +455,9 @@ (de go () (when (z3dWindow "RC Simulator" 800 600) (quit @) ) + (zero "MSec") (task `(*/ -1000 *DT 1.0) 0 # -Milliseconds - (let (U (usec) R (assoc @ *Run)) + (let R (assoc @ *Run) (sim> *Scene) (sim> *Model) (use (Yaw Pitch) @@ -475,10 +476,10 @@ (16000.0 "(+)") (32000.0 "(++)") ) ) (z3dSync) - (set (cdr R) - (min -2 - (+ - `(*/ -1000 *DT 1.0) # -Milliseconds - (*/ (- (usec) U) 1000) ) ) ) ) ) ) + (let M (*/ (usec) 1000) + (setq "MSec" + (- M + (set (cdr R) + (min -2 (- M "MSec" `(*/ 1000 *DT 1.0))) ) ) ) ) ) ) ) # vi:et:ts=3:sw=3