mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 02:30:38 -08:00
fix bug related to GET-INTERNAL-REAL-TIME, which in ECL is now micro-seconds (was: milli-seconds)
This commit is contained in:
parent
cc96a2c2df
commit
d17fea07d8
3 changed files with 3 additions and 3 deletions
|
|
@ -241,7 +241,7 @@
|
|||
(setf start (get-internal-real-time))
|
||||
(qsingle-shot 100 'force-repaint))
|
||||
(when (> (- (get-internal-real-time) start)
|
||||
300)
|
||||
(* 300 1000))
|
||||
(setf start nil)))))
|
||||
|
||||
(defun force-repaint ()
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
(defun filter (lat lon accuracy speed)
|
||||
(when (and lat lon accuracy speed)
|
||||
(setf accuracy (max 1 accuracy))
|
||||
(let ((timestamp (get-internal-real-time)))
|
||||
(let ((timestamp (/ (get-internal-real-time) 1000.0)))
|
||||
(if *variance*
|
||||
(let ((time-inc (- timestamp *timestamp*)))
|
||||
(incf *variance* (/ (* time-inc (expt speed 2)) 1000))
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"After *DISTANCE-SAMPLES* samples, calculate average speed and update on
|
||||
every new distance sample."
|
||||
(push (cons (distance)
|
||||
(get-internal-real-time))
|
||||
(/ (get-internal-real-time) 1000.0))
|
||||
samples)
|
||||
(when (> (length samples) *distance-samples*)
|
||||
(setf samples (butlast samples))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue