0.pre7.50:
[sbcl.git] / src / code / time.lisp
index 6b9f5de..1b4e823 100644 (file)
             (setq *internal-real-time-base-seconds* seconds)
             uint)))))
 
-;;; REMOVEME once runtime nonmonotonicity problem is debugged
-(defvar *last-utime-sec*)
-(defvar *last-utime-usec*)
-(defvar *last-stime-sec*)
-(defvar *last-stime-usec*)
-(defvar *last-internal-run-time*)
-(push (lambda ()
-       (makunbound '*last-internal-run-time*))
-      *before-save-initializations*)
-
 (defun get-internal-run-time ()
   #!+sb-doc
   "Return the run time in the internal time format. This is useful for
                               stime-usec
                               (floor micro-seconds-per-internal-time-unit 2))
                            micro-seconds-per-internal-time-unit))))
-
-      ;; REMOVEME once runtime nonmonotonicity problem is debugged
-      (when (boundp '*last-internal-run-time*)
-       (unless (>= result *last-internal-run-time*)
-         (error "non-monotonic:~@
-                  UTIME-SEC ~S ~S~@
-                  UTIME-USEC ~S ~S~@
-                  STIME-SEC ~S ~S~@
-                  STIME-USEC ~S ~S~@
-                  RESULT ~S ~S"
-                *last-utime-sec* utime-sec
-                *last-utime-usec* utime-usec
-                *last-stime-sec* stime-sec
-                *last-stime-usec* stime-usec
-                *last-internal-run-time* result)))
-      (setf *last-utime-sec* utime-sec
-           *last-utime-usec* utime-usec
-           *last-stime-sec* stime-sec
-           *last-stime-usec* stime-usec
-           *last-internal-run-time* result)
-      
       result)))
 \f
 ;;;; Encode and decode universal times.
 
 (defun get-universal-time ()
   #!+sb-doc
-  "Returns a single integer for the current time of
+  "Return a single integer for the current time of
    day in universal time format."
   (multiple-value-bind (res secs) (sb!unix:unix-gettimeofday)
     (declare (ignore res))
 
 (defun get-decoded-time ()
   #!+sb-doc
-  "Returns nine values specifying the current time as follows:
+  "Return nine values specifying the current time as follows:
    second, minute, hour, date, month, year, day of week (0 = Monday), T
    (daylight savings times) or NIL (standard time), and timezone."
   (decode-universal-time (get-universal-time)))
 
 (defmacro time (form)
   #!+sb-doc
-  "Evaluates the Form and prints timing information on *Trace-Output*."
+  "Execute FORM and print timing information on *TRACE-OUTPUT*."
   `(%time #'(lambda () ,form)))
 
-;;; Try to compile the closure arg to %TIME if it is interpreted.
-(defun massage-time-function (fun)
-  (cond
-   ((sb!eval:interpreted-function-p fun)
-    (multiple-value-bind (def env-p) (function-lambda-expression fun)
-      (declare (ignore def))
-      (cond
-       (env-p
-       (warn "TIME form in a non-null environment, forced to interpret.~@
-              Compiling entire form will produce more accurate times.")
-       fun)
-       (t
-       (compile nil fun)))))
-   (t fun)))
-
-;;; Return all the files that we want time to report.
+;;; Return all the data that we want TIME to report.
 (defun time-get-sys-info ()
   (multiple-value-bind (user sys faults) (sb!sys:get-system-info)
     (values user sys faults (get-bytes-consed))))
 ;;; The guts of the TIME macro. Compute overheads, run the (compiled)
 ;;; function, report the times.
 (defun %time (fun)
-  (let ((fun (massage-time-function fun))
-       old-run-utime
+  (let (old-run-utime
        new-run-utime
        old-run-stime
        new-run-stime