home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
autocad
/
boost.arj
/
TIMEIT.LSP
< prev
Wrap
Text File
|
1991-07-15
|
4KB
|
99 lines
;************************************************************************
;* File: TIMEIT.LSP *
;* Date: July 15, 1991 *
;* Description: A LISP program to test performance of AutoCAD display *
;* drivers. To load the program, enter AutoCAD and *
;* type: *
;* *
;* (LOAD "TIMEIT") *
;* *
;* To start the program, type TIMEIT then enter a comment. *
;* The result of the test is added to the file TIMEIT. *
;* The time placed in the file represents time to do a *
;* ZOOM or PAN redraw (one of the most critical operations *
;* for a typical AutoCAD user). The time is followed *
;* by the drawing name and comment. *
;* *
;* Feel free to distribute this program, as long as the address of the *
;* author and copyright remains with it: *
;* Graphics Software Labs (Publisher of AutoCAD display drivers) *
;* 7906 Moonmist Circle, Huntington Beach, CA 92648, USA, (714)960-6361 *
;* (c) Copyright Graphics Software Labs 1991, All Rights Reserved *
;************************************************************************
(defun C:TIMEIT ()
(setq cmnt (getstring T "Enter comment: "))
(setq fd (open "timeit" "a"))
(command "time" "reset" "on" "")
(command "redraw")
(command "redraw")
(command "redraw")
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (getvar "userr2"))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(command "zoom" "5.123")
(setvar "userr1" (getvar "tdusrtimer"))
(command "zoom" "p")
(setvar "userr2" (- (getvar "tdusrtimer") (getvar "userr1")))
(setvar "userr3" (+ (getvar "userr2") (getvar "userr3")))
(princ (* 8640.0 (getvar "userr3")) fd)
(princ (strcat " - [" (getvar "dwgname") "] " cmnt) fd)
(princ "\n" fd)
(close fd)
(command "resume")
)