summaryrefslogtreecommitdiff
path: root/lisp/cedet/semantic/lex.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-10-20 19:40:09 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-20 19:42:23 -0700
commitc75f505dea6a560b825384cf3d277690f86840bf (patch)
tree5a4463599b2498f0fd59e32167f99da8d8320336 /lisp/cedet/semantic/lex.el
parentc73769255c70fc0dc529a9b5c73cd5b4cfb05817 (diff)
downloademacs-c75f505dea6a560b825384cf3d277690f86840bf.tar.gz
Prefer nil to (current-time) when either works
* doc/misc/gnus.texi (Category Syntax): * lisp/allout-widgets.el (allout-widgets-post-command-business): * lisp/cedet/ede/detect.el (ede-detect-qtest): * lisp/cedet/pulse.el (pulse-momentary-highlight-overlay) (pulse-tick): * lisp/cedet/semantic.el (bovinate): * lisp/cedet/semantic/analyze.el: (semantic-analyze-current-symbol-default, semantic-adebug-analyze): * lisp/cedet/semantic/analyze/refs.el (semantic-analyze-current-tag): * lisp/cedet/semantic/lex.el (semantic-lex-test): * lisp/cedet/semantic/symref/filter.el: (semantic-symref-test-count-hits-in-tag): * lisp/cedet/srecode/dictionary.el (srecode-adebug-dictionary): * lisp/cedet/srecode/map.el (srecode-adebug-maps): * lisp/desktop.el (desktop-create-buffer): * lisp/emacs-lisp/benchmark.el (benchmark-elapse): * lisp/emacs-lisp/elp.el (elp--make-wrapper): * lisp/epa.el (epa--show-key): * lisp/erc/erc.el (erc-lurker-cleanup, erc-lurker-p): * lisp/gnus/gnus-agent.el (gnus-agent-fetch-articles) (gnus-agent-expire-group-1, gnus-agent-store-article): * lisp/gnus/gnus-art.el (article-lapsed-string): * lisp/gnus/gnus-cloud.el (gnus-cloud-update-newsrc-data) (gnus-cloud-collect-full-newsrc): * lisp/gnus/gnus-group.el (gnus-group-timestamp-delta): * lisp/gnus/gnus-html.el (gnus-html-cache-expired): * lisp/gnus/gnus-score.el (gnus-score-load-file) (gnus-decay-scores): * lisp/gnus/nndiary.el (nndiary-expired-article-p): * lisp/gnus/nnmail.el (nnmail-expired-article-p): * lisp/gnus/nnmaildir.el (nnmaildir--scan): * lisp/gnus/score-mode.el (gnus-score-edit-insert-date): * lisp/image/gravatar.el (gravatar-cache-expired): * lisp/net/newst-backend.el (newsticker--image-get) (newsticker--cache-mark-expired): * lisp/nxml/rng-maint.el (rng-time-function): * lisp/org/org-agenda.el (org-agenda-to-appt): * lisp/org/org-clock.el (org-clock-resolve-clock) (org-clock-resolve, org-resolve-clocks-if-idle): * lisp/org/org-colview.el (org-columns-edit-value, org-columns) (org-columns-compute-all, org-agenda-columns): * lisp/org/org-element.el (org-element--cache-interrupt-p) (org-element--cache-sync): * lisp/org/org-habit.el (org-habit-get-faces) (org-habit-insert-consistency-graphs): * lisp/org/org-indent.el (org-indent-add-properties): * lisp/org/org-timer.el (org-timer-start) (org-timer-pause-or-continue, org-timer-seconds) (org-timer-show-remaining-time, org-timer-set-timer): * lisp/org/org.el (org-babel-load-file, org-current-time) (org-today, org-auto-repeat-maybe, org-read-date-analyze) (org-small-year-to-year, org-goto-calendar): * lisp/org/ox.el (org-export-insert-default-template): * lisp/time.el (emacs-uptime): * lisp/type-break.el (type-break-mode, type-break) (type-break-time-warning-schedule, type-break-check): * lisp/url/url-cache.el (url-cache-expired): * lisp/url/url.el (url-retrieve-synchronously): * test/lisp/char-fold-tests.el (char-fold--speed-test): * test/manual/cedet/semantic-ia-utest.el: (semantic-symref-test-count-hits-in-tag): * test/manual/cedet/semantic-tests.el (semantic-idle-pnf-test) (semantic-lex-test-full-depth): Use nil instead of (current-time) where either will do, as nil is a bit more efficient and should have less timing error.
Diffstat (limited to 'lisp/cedet/semantic/lex.el')
-rw-r--r--lisp/cedet/semantic/lex.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index eec6e6762f3..835888db2ad 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -657,10 +657,9 @@ If universal argument ARG, then try the whole buffer."
(let* ((start (current-time))
(result (semantic-lex
(if arg (point-min) (point))
- (point-max)))
- (end (current-time)))
+ (point-max))))
(message "Elapsed Time: %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(pop-to-buffer "*Lexer Output*")
(require 'pp)
(erase-buffer)
@@ -810,7 +809,7 @@ analyzer which might mistake a number for as a symbol."
tmp-start (car semantic-lex-token-stream)))
(setq tmp-start semantic-lex-end-point)
(goto-char semantic-lex-end-point)
- ;;(when (> (semantic-elapsed-time starttime (current-time))
+ ;;(when (> (semantic-elapsed-time starttime nil)
;; semantic-lex-timeout)
;; (error "Timeout during lex at char %d" (point)))
(semantic-throw-on-input 'lex)