org-timer: Further simplification

* lisp/org-timer.el (org-timer-seconds): Remove function.
(org-timer-value-string): Fix docstring.  Remove call to
`org-timer-seconds'.
This commit is contained in:
Nicolas Goaziou 2019-02-13 13:02:28 +01:00
parent c0213eb743
commit 8e9b8dc2eb

View file

@ -226,15 +226,12 @@ it in the buffer."
(insert (org-timer-value-string))))) (insert (org-timer-value-string)))))
(defun org-timer-value-string () (defun org-timer-value-string ()
"Set the timer string." "Return current timer string."
(format org-timer-format (format org-timer-format
(org-timer-secs-to-hms (org-timer-secs-to-hms
(abs (floor (org-timer-seconds)))))) (let ((time (- (float-time org-timer-pause-time)
(float-time org-timer-start-time))))
(defun org-timer-seconds () (abs (floor (if org-timer-countdown-timer (- time) time)))))))
(funcall (if org-timer-countdown-timer #'+ #'-)
(- (float-time org-timer-start-time)
(float-time org-timer-pause-time))))
;;;###autoload ;;;###autoload
(defun org-timer-change-times-in-region (beg end delta) (defun org-timer-change-times-in-region (beg end delta)