Function: timeclock-update-mode-line
timeclock-update-mode-line is an interactive and byte-compiled
function defined in timeclock.el.gz.
Signature
(timeclock-update-mode-line)
Documentation
Update the timeclock-mode-string displayed in the mode line.
The value of timeclock-relative affects the display as described in
that variable's documentation.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/timeclock.el.gz
(defun timeclock-update-mode-line ()
"Update the `timeclock-mode-string' displayed in the mode line.
The value of `timeclock-relative' affects the display as described in
that variable's documentation."
(interactive)
(let ((remainder
(if timeclock-use-elapsed
(timeclock-workday-elapsed)
(timeclock-workday-remaining (not timeclock-relative))))
(last-in (equal (car timeclock-last-event) "i"))
(todays-date (timeclock-time-to-date)))
(when (and (< remainder 0)
(not (and timeclock-day-over
(equal timeclock-day-over todays-date))))
(setq timeclock-day-over todays-date)
(run-hooks 'timeclock-day-over-hook))
(setq timeclock-mode-string
(propertize
(format " %c%s%c "
(if last-in ?< ?\[)
(timeclock-seconds-to-string remainder nil t)
(if last-in ?> ?\]))
'help-echo "timeclock: time remaining"))))