(save-excursion
(goto-char end)
(point-marker))
- (nth 1 (current-time))
+ (encode-time nil 'integer)
context))
(message "Indenting region..."))
))
(defun c-progress-update ()
(if (not (and c-progress-info c-progress-interval))
nil
- (let ((now (nth 1 (current-time)))
+ (let ((now (encode-time nil 'integer))
(start (aref c-progress-info 0))
(end (aref c-progress-info 1))
(lastsecs (aref c-progress-info 2)))
(or l (setq l 1))
(or step (setq step 500))
(or lim (setq lim 40))
- (let* ((timems (function (lambda ()
- (let ((tt (current-time)))
- (+ (* 1000 (nth 1 tt)) (/ (nth 2 tt) 1000))))))
+ (let* ((timems (function (lambda () (car (encode-time nil 1000)))))
(tt (funcall timems)) (c 0) delta tot)
(goto-char (point-min))
(forward-line (1- l))
(defun vhdl-update-progress-info (string pos)
"Update progress information."
(when (and vhdl-progress-info (not noninteractive)
- (< vhdl-progress-interval
- (- (nth 1 (current-time)) (aref vhdl-progress-info 2))))
+ (time-less-p vhdl-progress-interval
+ (time-subtract nil (aref vhdl-progress-info 2))))
(let ((delta (- (aref vhdl-progress-info 1)
(aref vhdl-progress-info 0))))
(message "%s... (%2d%%)" string
100
(floor (* 100.0 (- pos (aref vhdl-progress-info 0)))
delta))))
- (aset vhdl-progress-info 2 (nth 1 (current-time)))))
+ (aset vhdl-progress-info 2 (encode-time nil 'integer))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indentation commands
(upcase-word -1)
(downcase-word -1)))
(when (and count vhdl-progress-interval (not noninteractive)
- (< vhdl-progress-interval
- (- (nth 1 (current-time)) last-update)))
+ (time-less-p vhdl-progress-interval
+ (time-subtract nil last-update)))
(message "Fixing case... (%2d%s)"
(+ (* count 20) (/ (* 20 (- (point) beg)) (- end beg)))
"%")
- (setq last-update (nth 1 (current-time)))))
+ (setq last-update (encode-time nil 'integer))))
(goto-char end)))))
(defun vhdl-fix-case-region (beg end &optional arg)