Function: org-timer-start
org-timer-start is an autoloaded, interactive and byte-compiled
function defined in org-timer.el.gz.
Signature
(org-timer-start &optional OFFSET)
Documentation
Set the starting time for the relative timer to now.
When called with prefix argument OFFSET, prompt the user for an offset time, with the default taken from a timer stamp at point, if any. If OFFSET is a string or an integer, it is directly taken to be the offset without user interaction. When called with a double prefix arg, all timer strings in the active region will be shifted by a specific amount. You will be prompted for the amount, with the default to make the first timer string in the region 0:00:00.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-timer.el.gz
;;;###autoload
(defun org-timer-start (&optional offset)
"Set the starting time for the relative timer to now.
When called with prefix argument OFFSET, prompt the user for an offset time,
with the default taken from a timer stamp at point, if any.
If OFFSET is a string or an integer, it is directly taken to be the offset
without user interaction.
When called with a double prefix arg, all timer strings in the active
region will be shifted by a specific amount. You will be prompted for
the amount, with the default to make the first timer string in
the region 0:00:00."
(interactive "P")
(cond
((equal offset '(16))
(call-interactively 'org-timer-change-times-in-region))
(org-timer-countdown-timer
(user-error "Countdown timer is running. Cancel first"))
(t
(let (delta def s)
(if (not offset)
(setq org-timer-start-time (current-time))
(cond
((integerp offset) (setq delta offset))
((stringp offset) (setq delta (org-timer-hms-to-secs offset)))
(t
(setq def (if (org-in-regexp org-timer-re)
(match-string 0)
"0:00:00")
s (read-string
(format "Restart timer with offset [%s]: " def)))
(unless (string-match "\\S-" s) (setq s def))
(setq delta (org-timer-hms-to-secs (org-timer-fix-incomplete s)))))
(setq org-timer-start-time (time-since delta)))
(setq org-timer-pause-time nil)
(org-timer-set-mode-line 'on)
(message "Timer start time set to %s, current value is %s"
(format-time-string "%T" org-timer-start-time)
(org-timer-secs-to-hms (or delta 0)))
(run-hooks 'org-timer-start-hook)))))