Skip to content
Snippets Groups Projects
Commit 0822f3a6 authored by wlott's avatar wlott
Browse files

Added some type decls so that get-internal-real-time doesn't cons.

parent 0827acee
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/time.lisp,v 1.9 1992/02/14 23:45:37 wlott Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/time.lisp,v 1.10 1992/02/19 21:53:58 wlott Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -53,15 +53,17 @@ ...@@ -53,15 +53,17 @@
finding elapsed time. See Internal-Time-Units-Per-Second." finding elapsed time. See Internal-Time-Units-Per-Second."
(locally (declare (optimize (speed 3) (safety 0))) (locally (declare (optimize (speed 3) (safety 0)))
(multiple-value-bind (ignore seconds useconds) (unix:unix-gettimeofday) (multiple-value-bind (ignore seconds useconds) (unix:unix-gettimeofday)
(declare (ignore ignore)) (declare (ignore ignore) (type (unsigned-byte 32) seconds useconds))
(let ((base *internal-real-time-base-seconds*) (let ((base *internal-real-time-base-seconds*)
(uint (truncate useconds (uint (truncate useconds
micro-seconds-per-internal-time-unit))) micro-seconds-per-internal-time-unit)))
(declare (type (unsigned-byte 32) uint)) (declare (type (unsigned-byte 32) uint))
(cond (base (cond (base
(+ (* (the (unsigned-byte 32) (- seconds base)) (truly-the (unsigned-byte 32)
internal-time-units-per-second) (+ (the (unsigned-byte 32)
uint)) (* (the (unsigned-byte 32) (- seconds base))
internal-time-units-per-second))
uint)))
(t (t
(setq *internal-real-time-base-seconds* seconds) (setq *internal-real-time-base-seconds* seconds)
uint)))))) uint))))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment