46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
;; Function To Be Tested: get-internal-run-time
|
|
;;
|
|
;; Source: Guy L Steele's CLTL Chapter 25: Miscellaneous Features
|
|
;; Section: 25.4.1 Time Functions
|
|
;; Page: 446
|
|
;;
|
|
;; Created By: John Park
|
|
;;
|
|
;; Creation Date: Aug 20,1986
|
|
;;
|
|
;; Last Update: Oct 2, 1986
|
|
;;
|
|
;; Filed As: {ERIS}<LISPCORE>CML>TEST>25-4-get-internal-run-time.test
|
|
;;
|
|
;;
|
|
;; Syntax: (get-internal-run-time)
|
|
;;
|
|
;; Function Description: This function returns the current run time. The intent is
|
|
;; that the difference between the two calls during which computational effort was
|
|
;; expended on behalf of the executing program.
|
|
;;
|
|
;; Argument(s): none
|
|
;;
|
|
;; Returns: Integer
|
|
;;
|
|
;; Constraints/Limitations: none
|
|
|
|
(do-test-group ("get-internal-run-time-setup"
|
|
:before (progn
|
|
(setq before-internal-time (get-internal-run-time))
|
|
(defstruct science physics chemistry math)
|
|
(setq after-internal-time (get-internal-run-time))))
|
|
|
|
(do-test "internal-time-units-per-second-exist?"
|
|
(and (integerp internal-time-units-per-second)
|
|
(boundp 'internal-time-units-per-second)))
|
|
|
|
(do-test "get-internal-run-time"
|
|
(and(integerp (get-internal-run-time))
|
|
(> (- after-internal-time before-internal-time) 0))))
|
|
|
|
|
|
STOP
|
|
|
|
|