From ee6f1be04b41b6cf530cfb34a5b30f0c0649f5b0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 30 Jun 2011 18:52:41 -0700 Subject: * nxml/rng-maint.el (rng-time-function): Rewrite using time-subtract. This yields a more-accurate answer. (rng-time-to-float): Remove; no longer needed. --- lisp/nxml/rng-maint.el | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lisp/nxml/rng-maint.el') diff --git a/lisp/nxml/rng-maint.el b/lisp/nxml/rng-maint.el index d31740f0ca2..bd5b3136d54 100644 --- a/lisp/nxml/rng-maint.el +++ b/lisp/nxml/rng-maint.el @@ -224,19 +224,13 @@ ;;; Timing -(defun rng-time-to-float (time) - (+ (* (nth 0 time) 65536.0) - (nth 1 time) - (/ (nth 2 time) 1000000.0))) - (defun rng-time-function (function &rest args) (let* ((start (current-time)) (val (apply function args)) (end (current-time))) (message "%s ran in %g seconds" function - (- (rng-time-to-float end) - (rng-time-to-float start))) + (float-time (time-subtract end start))) val)) (defun rng-time-tokenize-buffer () -- cgit v1.2.1