Message 1 of 12
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
For me, these system variables return different values in 2017 than they do in earlier versions.
Can I get help verifying this?
Using this bit of code
(progn (setvar "dimzin" 0) (repeat 100 (princ (strcat "\n" (rtos (getvar "date") 2 12) ) ) ) (princ) )
In 2017 I generally get the same exact answer for all 100 replies, which means if you subtract the last reply from the first, the net elapsed time = 0.0.
In earlier versions, the 100 answers almost all vary and the difference between the first and last is about 0.000000914 (presumably, the time it takes to process this code)
Why does this matter? Using the function below, note the responses from 2016 and earlier, compared to 2017.
(defun C:foo () (defun gettime () (setq s (getvar "DATE")) (setq seconds (* 86400.0 (- s (fix s)))) ) (setq begin (gettime)) ; introduce a delay so we have something to time (command "._delay" 500) (setvar "dimzin" 0) (princ (strcat "\n" (rtos (- (gettime) begin) 2 12))) (princ) )
----
;;; Response in 2016 and earlier = approx 0.5 seconds, which is expected Command: FOO 0.502994656563 Command: FOO 0.505006313324 Command: FOO 0.502994656563 Command: FOO 0.505006313324 Command: FOO 0.504000484943 Command: FOO 0.505971908569 Command: FOO 0.501988828182
---
Response in 2017 = 0.0 or 1.0 seconds, everytime. Why? Command: FOO 0.999994575977 Command: FOO 0.000000000000 Command: FOO 0.999994575977 Command: FOO 0.000000000000 Command: FOO 0.000000000000 Command: FOO 0.999994575977 Command: FOO 0.999994575977 Command: FOO 0.000000000000 Command: FOO 0.000000000000
What am I missing here? Is there another sysvar I'm overlooking that would have this effect?
TIA.
Solved! Go to Solution.