0.9.1.1:
[sbcl.git] / src / code / time.lisp
index e467daf..c028cb2 100644 (file)
     (if (< unix-time (ash 1 31))
        unix-time
        (multiple-value-bind (year offset) (years-since-mar-2000 utime)
+         (declare (ignore year))
          (+  +mar-1-2035+  (- unix-to-universal-time)  offset)))))
   
 (defun decode-universal-time (universal-time &optional time-zone)
 \f
 ;;;; TIME
 
+(defvar *gc-run-time* 0
+  #!+sb-doc
+  "the total CPU time spent doing garbage collection (as reported by
+   GET-INTERNAL-RUN-TIME)")
+(declaim (type index *gc-run-time*))
+
 (defmacro time (form)
   #!+sb-doc
   "Execute FORM and print timing information on *TRACE-OUTPUT*."
       (let ((gc-run-time (max (- *gc-run-time* start-gc-run-time) 0)))
        (format *trace-output*
                "~&Evaluation took:~%  ~
-                ~S second~:P of real time~%  ~
-                ~S second~:P of user run time~%  ~
-                ~S second~:P of system run time~%  ~
+                 ~S second~:P of real time~%  ~
+                 ~S second~:P of user run time~%  ~
+                 ~S second~:P of system run time~%  ~
 ~@[                 [Run times include ~S second~:P GC run time.]~%  ~]~
-                ~S page fault~:P and~%  ~
-                ~S bytes consed.~%"
+                 ~S page fault~:P and~%  ~
+                 ~:D bytes consed.~%"
                (max (/ (- new-real-time old-real-time)
                        (float sb!xc:internal-time-units-per-second))
                     0.0)