(defun my-article-old-p ()
"Say whether an article is old."
(< (time-to-days (date-to-time (mail-header-date gnus-headers)))
- (- (time-to-days (current-time)) gnus-agent-expire-days)))
+ (- (time-to-days nil) gnus-agent-expire-days)))
@end lisp
with the predicate then defined as:
(if allout-widgets-time-decoration-activity
(setq allout-widgets-last-decoration-timing
- (list (allout-elapsed-time-seconds (current-time)
- start-time)
+ (list (allout-elapsed-time-seconds nil start-time)
allout-widgets-changes-record)))
(setq allout-widgets-changes-record nil)
"Run a quick test for autodetecting on BUFFER."
(interactive)
(let ((start (current-time))
- (ans (ede-detect-directory-for-project default-directory))
- (end (current-time)))
+ (ans (ede-detect-directory-for-project default-directory)))
(if ans
(message "Project found in %d sec @ %s of type %s"
- (float-time (time-subtract end start))
+ (float-time (time-subtract nil start))
(car ans)
(eieio-object-name-string (cdr ans)))
(message "No Project found.") )))
(pulse-reset-face face)
(setq pulse-momentary-timer
(run-with-timer 0 pulse-delay #'pulse-tick
- (time-add (current-time)
+ (time-add nil
(* pulse-delay pulse-iterations)))))))
(defun pulse-tick (stop-time)
- (if (time-less-p (current-time) stop-time)
+ (if (time-less-p nil stop-time)
(pulse-lighten-highlight)
(pulse-momentary-unhighlight)))
(if clear (semantic-clear-toplevel-cache))
(if (eq clear '-) (setq clear -1))
(let* ((start (current-time))
- (out (semantic-fetch-tags))
- (end (current-time)))
+ (out (semantic-fetch-tags)))
(message "Retrieving tags took %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(when (or (null clear) (not (listp clear))
(and (numberp clear) (< 0 clear)))
(pop-to-buffer "*Parser Output*")
(defun semantic-analyze-current-symbol-default (analyzehookfcn position)
"Call ANALYZEHOOKFCN on the analyzed symbol at POSITION."
(let* ((semantic-analyze-error-stack nil)
- (LLstart (current-time))
+ ;; (LLstart (current-time))
(prefixandbounds (semantic-ctxt-current-symbol-and-bounds (or position (point))))
(prefix (car prefixandbounds))
(bounds (nth 2 prefixandbounds))
(scope (semantic-calculate-scope position))
- (end nil)
)
;; Only do work if we have bounds (meaning a prefix to complete)
(when bounds
prefix scope 'prefixtypes))
(error (semantic-analyze-push-error err))))
- (setq end (current-time))
- ;;(message "Analysis took %.2f sec" (semantic-elapsed-time LLstart end))
+ ;;(message "Analysis took %.2f sec" (semantic-elapsed-time LLstart nil))
)
(when prefix
(prog1
(funcall analyzehookfcn (car bounds) (cdr bounds) prefix)
- ;;(setq end (current-time))
- ;;(message "hookfcn took %.5f sec" (semantic-elapsed-time LLstart end))
+ ;;(message "hookfcn took %.5f sec" (semantic-elapsed-time LLstart nil))
)
)))
(interactive)
(require 'data-debug)
(let ((start (current-time))
- (ctxt (or ctxt (semantic-analyze-current-context)))
- (end (current-time)))
+ (ctxt (or ctxt (semantic-analyze-current-context))))
(if (not ctxt)
(message "No Analyzer Results")
(message "Analysis took %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(semantic-analyze-pulse ctxt)
(if ctxt
(progn
(let* ((tag (semantic-current-tag))
(start (current-time))
(sac (semantic-analyze-tag-references tag))
- (end (current-time))
)
- (message "Analysis took %.2f seconds." (semantic-elapsed-time start end))
+ (message "Analysis took %.2f seconds." (semantic-elapsed-time start nil))
(if sac
(progn
(require 'eieio-datadebug)
(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)
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)
(when (called-interactively-p 'interactive)
(message "Found %d occurrences of %s in %.2f seconds"
Lcount (semantic-tag-name target)
- (semantic-elapsed-time start (current-time))))
+ (semantic-elapsed-time start nil)))
Lcount)))
(defun semantic-symref-rename-local-variable ()
(srecode-get-mode-table modesym))
(error "No table found for mode %S" modesym)))
(dict (srecode-create-dictionary (current-buffer)))
- (end (current-time))
)
(message "Creating a dictionary took %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(data-debug-new-buffer "*SRECODE ADEBUG*")
(data-debug-insert-object-slots dict "*")))
(require 'data-debug)
(let ((start (current-time))
(p (srecode-get-maps t)) ;; Time the reset.
- (end (current-time))
)
(message "Updating the map took %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(data-debug-new-buffer "*SRECODE ADEBUG*")
(data-debug-insert-stuff-list p "*")))
(setq buffer-display-time
(if buffer-display-time
(time-add buffer-display-time
- (time-subtract (current-time)
- desktop-file-modtime))
+ (time-subtract nil desktop-file-modtime))
(current-time)))
(unless (< desktop-file-version 208) ; Don't misinterpret any old custom args
(dolist (record compacted-vars)
(defmacro benchmark-elapse (&rest forms)
"Return the time in seconds elapsed for execution of FORMS."
(declare (indent 0) (debug t))
- (let ((t1 (make-symbol "t1"))
- (t2 (make-symbol "t2")))
- `(let (,t1 ,t2)
+ (let ((t1 (make-symbol "t1")))
+ `(let (,t1)
(setq ,t1 (current-time))
,@forms
- (setq ,t2 (current-time))
- (float-time (time-subtract ,t2 ,t1)))))
+ (float-time (time-subtract nil ,t1)))))
;;;###autoload
(defmacro benchmark-run (&optional repetitions &rest forms)
;; and return the results.
(setq result (apply func args))
;; we are recording times
- (let (enter-time exit-time)
+ (let (enter-time)
;; increment the call-counter
(cl-incf (aref info 0))
(setq enter-time (current-time)
- result (apply func args)
- exit-time (current-time))
+ result (apply func args))
;; calculate total time in function
- (cl-incf (aref info 1) (elp-elapsed-time enter-time exit-time))
+ (cl-incf (aref info 1) (elp-elapsed-time enter-time nil))
))
;; turn off recording if this is the master function
(if (and elp-master
(epg-sub-key-creation-time (car pointer)))
(error "????-??-??"))
(if (epg-sub-key-expiration-time (car pointer))
- (format (if (time-less-p (current-time)
+ (format (if (time-less-p nil
(epg-sub-key-expiration-time
(car pointer)))
"\n\tExpires: %s"
(maphash
(lambda (nick last-PRIVMSG-time)
(when
- (> (float-time (time-subtract
- (current-time)
- last-PRIVMSG-time))
+ (> (float-time (time-subtract nil last-PRIVMSG-time))
erc-lurker-threshold-time)
(remhash nick hash)))
hash)
(gethash server erc-lurker-state (make-hash-table)))))
(or (null last-PRIVMSG-time)
(> (float-time
- (time-subtract (current-time) last-PRIVMSG-time))
+ (time-subtract nil last-PRIVMSG-time))
erc-lurker-threshold-time))))
(defcustom erc-common-server-suffixes
(let* ((fetched-articles (list nil))
(tail-fetched-articles fetched-articles)
(dir (gnus-agent-group-pathname group))
- (date (time-to-days (current-time)))
+ (date (time-to-days nil))
(case-fold-search t)
pos crosses
(file-name-coding-system nnmail-pathname-coding-system))
(nov-entries-deleted 0)
(info (gnus-get-info group))
(alist gnus-agent-article-alist)
- (day (- (time-to-days (current-time))
+ (day (- (time-to-days nil)
(gnus-agent-find-parameter group 'agent-days-until-old)))
(specials (if (and alist
(not force))
;; be expired later.
(gnus-agent-load-alist group)
(gnus-agent-save-alist group (list article)
- (time-to-days (current-time))))))
+ (time-to-days nil)))))
(defun gnus-agent-regenerate-group (group &optional reread)
"Regenerate GROUP.
(defun article-lapsed-string (time &optional max-segments)
;; If the date is seriously mangled, the timezone functions are
;; liable to bug out, so we ignore all errors.
- (let* ((now (current-time))
- (real-time (time-subtract now time))
+ (let* ((real-time (time-subtract nil time))
(real-sec (and real-time
(+ (* (float (car real-time)) 65536)
(cadr real-time))))
Use old data if FORCE-OLDER is not nil."
(let* ((contents (plist-get elem :contents))
(date (or (plist-get elem :timestamp) "0"))
- (now (gnus-cloud-timestamp (current-time)))
+ (now (gnus-cloud-timestamp nil))
(newer (string-lessp date now))
(group-info (gnus-get-info group)))
(if (and contents
(gnus-method-to-server
(gnus-find-method-for-group (gnus-info-group info))))
- (push `(:type :newsrc-data :name ,(gnus-info-group info) :contents ,info :timestamp ,(gnus-cloud-timestamp (current-time)))
+ (push `(:type :newsrc-data :name ,(gnus-info-group info) :contents ,info :timestamp ,(gnus-cloud-timestamp nil))
infos)))
infos))
"Return the offset in seconds from the timestamp for GROUP to the current time, as a floating point number."
(let* ((time (or (gnus-group-timestamp group)
(list 0 0)))
- (delta (time-subtract (current-time) time)))
+ (delta (time-subtract nil time)))
(+ (* (nth 0 delta) 65536.0)
(nth 1 delta))))
(not (file-exists-p (url-cache-create-filename url))))
(t (let ((cache-time (url-is-cached url)))
(if cache-time
- (time-less-p
- (time-add
- cache-time
- ttl)
- (current-time))
+ (time-less-p (time-add cache-time ttl) nil)
t)))))
;;;###autoload
(or (not decay)
(gnus-decay-scores alist decay)))
(gnus-score-set 'touched '(t) alist)
- (gnus-score-set 'decay (list (time-to-days (current-time))) alist))
+ (gnus-score-set 'decay (list (time-to-days nil)) alist))
;; We do not respect eval and files atoms from global score
;; files.
(when (and files (not global))
(defun gnus-decay-scores (alist day)
"Decay non-permanent scores in ALIST."
- (let ((times (- (time-to-days (current-time)) day))
+ (let ((times (- (time-to-days nil) day))
kill entry updated score n)
(unless (zerop times) ;Done decays today already?
(while (setq entry (pop alist))
;; past. A permanent schedule never expires.
(and sched
(setq sched (nndiary-last-occurrence sched))
- (time-less-p sched (current-time))))
+ (time-less-p sched nil)))
;; else
(nnheader-report 'nndiary "Could not read file %s" file)
nil)
(setq days (days-to-time days))
;; Compare the time with the current time.
(if (null time)
- (time-subtract (current-time) days)
+ (time-subtract nil days)
(ignore-errors (time-less-p days (time-since time)))))))))
(declare-function gnus-group-mark-article-read "gnus-group" (group article))
(when (or isnew nattr)
(dolist (file (funcall ls ndir nil "\\`[^.]" 'nosort))
(setq x (concat ndir file))
- (and (time-less-p (nth 5 (file-attributes x)) (current-time))
+ (and (time-less-p (nth 5 (file-attributes x)) nil)
(rename-file x (concat cdir (nnmaildir--ensure-suffix file)))))
(setf (nnmaildir--grp-new group) nattr))
(setq cattr (nth 5 (file-attributes cdir)))
(defun gnus-score-edit-insert-date ()
"Insert date in numerical format."
(interactive)
- (princ (time-to-days (current-time)) (current-buffer)))
+ (princ (time-to-days nil) (current-buffer)))
(defun gnus-score-pretty-print ()
"Format the current score file."
(not (file-exists-p (url-cache-create-filename url))))
(t (let ((cache-time (url-is-cached url)))
(if cache-time
- (time-less-p
- (time-add
- cache-time
- gravatar-cache-ttl)
- (current-time))
+ (time-less-p (time-add cache-time gravatar-cache-ttl) nil)
t)))))
(defun gravatar-get-data ()
download it from URL first."
(let ((image-name (concat directory feed-name)))
(if (and (file-exists-p image-name)
- (time-less-p (current-time)
+ (time-less-p nil
(time-add (nth 5 (file-attributes image-name))
(seconds-to-time 86400))))
(newsticker--debug-msg "%s: Getting image for %s skipped"
(when (eq (newsticker--age item) old-age)
(let ((exp-time (time-add (newsticker--time item)
(seconds-to-time time))))
- (when (time-less-p exp-time (current-time))
+ (when (time-less-p exp-time nil)
(newsticker--debug-msg
"Item `%s' from %s has expired on %s"
(newsticker--title item)
(defun rng-time-function (function &rest args)
(let* ((start (current-time))
- (val (apply function args))
- (end (current-time)))
+ (val (apply function args)))
(message "%s ran in %g seconds"
function
- (float-time (time-subtract end start)))
+ (float-time (time-subtract nil start)))
val))
(defun rng-time-tokenize-buffer ()
;; time and without date as argument, so it may pass wrong
;; information otherwise
(today (org-date-to-gregorian
- (time-to-days (current-time))))
+ (time-to-days nil)))
(org-agenda-restrict nil)
(files (org-agenda-files 'unrestricted)) entries file
(org-agenda-buffer nil))
(unless (org-is-active-clock clock)
(org-clock-clock-in clock t))))
- ((not (time-less-p resolve-to (current-time)))
+ ((not (time-less-p resolve-to nil))
(error "RESOLVE-TO must refer to a time in the past"))
(t
(and (not (memq char-pressed '(?i ?q))) char-pressed)))))
(default
(floor (/ (float-time
- (time-subtract (current-time) last-valid)) 60)))
+ (time-subtract nil last-valid)) 60)))
(keep
(and (memq ch '(?k ?K))
(read-number "Keep how many minutes? " default)))
(keep
(time-add last-valid (seconds-to-time (* 60 keep))))
(gotback
- (time-subtract (current-time)
- (seconds-to-time (* 60 gotback))))
+ (time-subtract nil (seconds-to-time (* 60 gotback))))
(t
(error "Unexpected, please report this as a bug")))
(and gotback last-valid)
org-clock-marker (marker-buffer org-clock-marker))
(let* ((org-clock-user-idle-seconds (org-user-idle-seconds))
(org-clock-user-idle-start
- (time-subtract (current-time)
+ (time-subtract nil
(seconds-to-time org-clock-user-idle-seconds)))
(org-clock-resolving-clocks-due-to-idleness t))
(if (> org-clock-user-idle-seconds (* 60 org-clock-idle-time))
(lambda (_)
(format "Clocked in & idle for %.1f mins"
(/ (float-time
- (time-subtract (current-time)
- org-clock-user-idle-start))
+ (time-subtract nil org-clock-user-idle-start))
60.0)))
org-clock-user-idle-start)))))
(eol (line-end-position))
(pom (or (get-text-property bol 'org-hd-marker) (point)))
(key (or key (get-char-property (point) 'org-columns-key)))
- (org-columns--time (float-time (current-time)))
+ (org-columns--time (float-time))
(action
(pcase key
("CLOCKSUM"
(org-columns-goto-top-level)
;; Initialize `org-columns-current-fmt' and
;; `org-columns-current-fmt-compiled'.
- (let ((org-columns--time (float-time (current-time))))
+ (let ((org-columns--time (float-time)))
(org-columns-get-format columns-fmt-string)
(unless org-columns-inhibit-recalculation (org-columns-compute-all))
(save-excursion
"Compute all columns that have operators defined."
(org-with-silent-modifications
(remove-text-properties (point-min) (point-max) '(org-summaries t)))
- (let ((org-columns--time (float-time (current-time)))
+ (let ((org-columns--time (float-time))
seen)
(dolist (spec org-columns-current-fmt-compiled)
(let ((property (car spec)))
(if (markerp org-columns-begin-marker)
(move-marker org-columns-begin-marker (point))
(setq org-columns-begin-marker (point-marker)))
- (let* ((org-columns--time (float-time (current-time)))
+ (let* ((org-columns--time (float-time))
(fmt
(cond
((bound-and-true-p org-agenda-overriding-columns-format))
TIME-LIMIT is a time value or nil."
(and time-limit
(or (input-pending-p)
- (time-less-p time-limit (current-time)))))
+ (time-less-p time-limit nil))))
(defsubst org-element--cache-shift-positions (element offset &optional props)
"Shift ELEMENT properties relative to buffer positions by OFFSET.
(and next (aref next 0))
threshold
(and (not threshold)
- (time-add (current-time)
+ (time-add nil
org-element-cache-sync-duration))
future-change)
;; Request processed. Merge current and next offsets and
(deadline (if scheduled-days
(+ scheduled-days (- d-repeat s-repeat))
(org-habit-deadline habit)))
- (m-days (or now-days (time-to-days (current-time)))))
+ (m-days (or now-days (time-to-days nil))))
(cond
((< m-days scheduled)
'(org-habit-clear-face . org-habit-clear-future-face))
"Insert consistency graph for any habitual tasks."
(let ((inhibit-read-only t)
(buffer-invisibility-spec '(org-link))
- (moment (time-subtract (current-time)
+ (moment (time-subtract nil
(list 0 (* 3600 org-extend-today-until) 0))))
(save-excursion
(goto-char (if line (point-at-bol) (point-min)))
(let* ((case-fold-search t)
(limited-re (org-get-limited-outline-regexp))
(level (or (org-current-level) 0))
- (time-limit (and delay (time-add (current-time) delay))))
+ (time-limit (and delay (time-add nil delay))))
;; For each line, set `line-prefix' and `wrap-prefix'
;; properties depending on the type of line (headline, inline
;; task, item or other).
;; In asynchronous mode, take a break of
;; `org-indent-agent-resume-delay' every DELAY to avoid
;; blocking any other idle timer or process output.
- ((and delay (time-less-p time-limit (current-time)))
+ ((and delay (time-less-p time-limit nil))
(setq org-indent-agent-resume-timer
(run-with-idle-timer
(time-add (current-idle-time) org-indent-agent-resume-delay)
;; Pass `current-time' result to `float-time' (instead
;; of calling without arguments) so that only
;; `current-time' has to be overridden in tests.
- (- (float-time (current-time)) delta))))
+ (- (float-time) delta))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(message "Timer start time set to %s, current value is %s"
(org-timer--run-countdown-timer
new-secs org-timer-countdown-timer-title))
(setq org-timer-start-time
- (time-add (current-time) (seconds-to-time new-secs))))
+ (time-add nil (seconds-to-time new-secs))))
(setq org-timer-start-time
;; Pass `current-time' result to `float-time' (instead
;; of calling without arguments) so that only
;; `current-time' has to be overridden in tests.
- (seconds-to-time (- (float-time (current-time))
+ (seconds-to-time (- (float-time)
(- pause-secs start-secs)))))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
;; overridden in tests.
(if org-timer-countdown-timer
(- (float-time org-timer-start-time)
- (float-time (or org-timer-pause-time (current-time))))
- (- (float-time (or org-timer-pause-time (current-time)))
+ (float-time org-timer-pause-time))
+ (- (float-time org-timer-pause-time)
(float-time org-timer-start-time))))
;;;###autoload
(message "No timer set")
(let* ((rtime (decode-time
(time-subtract (timer--time org-timer-countdown-timer)
- (current-time))))
+ nil)))
(rsecs (nth 0 rtime))
(rmins (nth 1 rtime)))
(message "%d minute(s) %d seconds left before next time out"
secs org-timer-countdown-timer-title))
(run-hooks 'org-timer-set-hook)
(setq org-timer-start-time
- (time-add (current-time) (seconds-to-time secs)))
+ (time-add nil (seconds-to-time secs)))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on))))))
(interactive "fFile to load: \nP")
(let* ((age (lambda (file)
(float-time
- (time-subtract (current-time)
+ (time-subtract nil
(nth 5 (or (file-attributes (file-truename file))
(file-attributes file)))))))
(base-name (file-name-sans-extension file))
(apply 'encode-time
(append (list 0 (* r (floor (+ .5 (/ (float (nth 1 time)) r)))))
(nthcdr 2 time))))
- (if (and past (< (float-time (time-subtract (current-time) res)) 0))
+ (if (and past (< (float-time (time-subtract nil res)) 0))
(seconds-to-time (- (float-time res) (* r 60)))
res))))
(defun org-today ()
"Return today date, considering `org-extend-today-until'."
(time-to-days
- (time-subtract (current-time)
- (list 0 (* 3600 org-extend-today-until) 0))))
+ (time-subtract nil (list 0 (* 3600 org-extend-today-until) 0))))
;;;; Font-Lock stuff, including the activators
(while (re-search-forward org-clock-line-re end t)
(when (org-at-clock-log-p) (throw :clock t))))))
(org-entry-put nil "LAST_REPEAT" (format-time-string
- (org-time-stamp-format t t)
- (current-time))))
+ (org-time-stamp-format t t))))
(when org-log-repeat
(if (or (memq 'org-add-log-note (default-value 'post-command-hook))
(memq 'org-add-log-note post-command-hook))
(let ((nshiftmax 10)
(nshift 0))
(while (or (= nshift 0)
- (not (time-less-p (current-time) time)))
+ (not (time-less-p nil time)))
(when (= (cl-incf nshift) nshiftmax)
(or (y-or-n-p
(format "%d repeater intervals were not \
;; overridden in tests.
(let ((org-def def)
(org-defdecode defdecode)
- (nowdecode (decode-time (current-time)))
+ (nowdecode (decode-time))
delta deltan deltaw deltadef year month day
hour minute second wday pm h2 m2 tl wday1
iso-year iso-weekday iso-week iso-date futurep kill-year)
; (when (and org-read-date-prefer-future
; (not iso-year)
; (< (calendar-absolute-from-gregorian iso-date)
- ; (time-to-days (current-time))))
+ ; (time-to-days nil)))
; (setq year (1+ year)
; iso-date (calendar-gregorian-from-absolute
; (calendar-iso-to-absolute
;; Pass `current-time' result to `decode-time' (instead of
;; calling without arguments) so that only `current-time' has
;; to be overridden in tests.
- (let ((now (decode-time (current-time))))
+ (let ((now (decode-time)))
(setq day (nth 3 now) month (nth 4 now) year (nth 5 now))))
(cond ((member deltaw '("d" "")) (setq day (+ day deltan)))
((equal deltaw "w") (setq day (+ day (* 7 deltan))))
YEAR is expanded into one of the 30 next years, if possible, or
into a past one. Any year larger than 99 is returned unchanged."
(if (>= year 100) year
- (let* ((current (string-to-number (format-time-string "%Y" (current-time))))
+ (let* ((current (string-to-number (format-time-string "%Y")))
(century (/ current 100))
(offset (- year (% current 100))))
(cond ((> offset 30) (+ (* (1- century) 100) year))
diff)
(when (or (org-at-timestamp-p 'lax)
(org-match-line (concat ".*" org-ts-regexp)))
- (let ((d1 (time-to-days (current-time)))
+ (let ((d1 (time-to-days nil))
(d2 (time-to-days (org-time-string-to-time (match-string 1)))))
(setq diff (- d2 d1))))
(calendar)
(let ((val (cond ((equal (car key) "DATE")
(or (cdr key)
(with-temp-buffer
- (org-insert-time-stamp (current-time)))))
+ (org-insert-time-stamp nil))))
((equal (car key) "TITLE")
(or (let ((visited-file
(buffer-file-name (buffer-base-buffer))))
(let ((str
(format-seconds (or format "%Y, %D, %H, %M, %z%S")
(float-time
- (time-subtract (current-time) before-init-time)))))
+ (time-subtract nil before-init-time)))))
(if (called-interactively-p 'interactive)
(message "%s" str)
str)))
(if (and type-break-time-last-break
(< (setq diff (type-break-time-difference
type-break-time-last-break
- (current-time)))
+ nil))
type-break-interval))
;; Use the file's value.
(progn
(cond
(good-interval
(let ((break-secs (type-break-time-difference
- start-time (current-time))))
+ start-time nil)))
(cond
((>= break-secs good-interval)
(setq continue nil))
type-break-time-warning-intervals))
(or time
- (setq time (type-break-time-difference (current-time)
+ (setq time (type-break-time-difference nil
type-break-time-next-break)))
(while (and type-break-current-time-warning-interval
(and type-break-good-rest-interval
(progn
(and (> (type-break-time-difference
- type-break-time-last-command (current-time))
+ type-break-time-last-command nil)
type-break-good-rest-interval)
(progn
(type-break-keystroke-reset)
(time-add
cache-time
(seconds-to-time (or expire-time url-cache-expire-time)))
- (current-time))))))
+ nil)))))
(defun url-cache-prune-cache (&optional directory)
"Remove all expired files from the cache.
;; process output.
(while (and (not retrieval-done)
(or (not timeout)
- (< (float-time (time-subtract
- (current-time) start-time))
+ (< (float-time (time-subtract nil start-time))
timeout)))
(url-debug 'retrieval
"Spinning in url-retrieve-synchronously: %S (%S)"
(char-fold-to-regexp string)))
(with-temp-buffer
(save-excursion (insert string))
- (let ((time (time-to-seconds (current-time))))
+ (let ((time (time-to-seconds)))
;; Our initial implementation of case-folding in char-folding
;; created a lot of redundant paths in the regexp. Because of
;; that, if a really long string "almost" matches, the regexp
;; engine took a long time to realize that it doesn't match.
(should-not (char-fold-search-forward (concat string "c") nil 'noerror))
;; Ensure it took less than a second.
- (should (< (- (time-to-seconds (current-time))
- time)
- 1))))))
+ (should (< (- (time-to-seconds) time) 1))))))
(provide 'char-fold-tests)
;;; char-fold-tests.el ends here
(when (interactive-p)
(message "Found %d occurrences of %s in %.2f seconds"
Lcount (semantic-tag-name target)
- (semantic-elapsed-time start (current-time))))
+ (semantic-elapsed-time start nil)))
Lcount)))
(defun semantic-src-utest-buffer-refs ()
"Test `semantic-idle-scheduler-work-parse-neighboring-files' and time it."
(interactive)
(let ((start (current-time))
- (junk (semantic-idle-scheduler-work-parse-neighboring-files))
- (end (current-time)))
- (message "Work took %.2f seconds." (semantic-elapsed-time start end))))
+ (junk (semantic-idle-scheduler-work-parse-neighboring-files)))
+ (message "Work took %.2f seconds." (semantic-elapsed-time start nil))))
;;; From semantic-lex:
(result (semantic-lex
(if arg (point-min) (point))
(point-max)
- 100))
- (end (current-time)))
+ 100)))
(message "Elapsed Time: %.2f seconds."
- (semantic-elapsed-time start end))
+ (semantic-elapsed-time start nil))
(pop-to-buffer "*Lexer Output*")
(require 'pp)
(erase-buffer)
(when (interactive-p)
(message "Found %d occurrences of %s in %.2f seconds"
Lcount (semantic-tag-name target)
- (semantic-elapsed-time start (current-time))))
+ (semantic-elapsed-time start nil)))
Lcount)))
;;; From bovine-gcc: