Variable: timeclock-use-display-time
timeclock-use-display-time is a customizable variable defined in
timeclock.el.gz.
Value
t
Documentation
If non-nil, use display-time-hook for doing mode line updates.
The advantage of this is that one less timer has to be set running
amok in Emacs's process space. The disadvantage is that it requires
you to have display-time running. If you don't want to use
display-time, but still want the mode line to show how much time is
left, set this variable to nil. Changing the value of this variable
while timeclock information is being displayed in the mode line has no
effect. You should call the function timeclock-mode-line-display(var)/timeclock-mode-line-display(fun) with
a positive argument to force an update.
Source Code
;; Defined in /usr/src/emacs/lisp/calendar/timeclock.el.gz
(defcustom timeclock-use-display-time t
"If non-nil, use `display-time-hook' for doing mode line updates.
The advantage of this is that one less timer has to be set running
amok in Emacs's process space. The disadvantage is that it requires
you to have `display-time' running. If you don't want to use
`display-time', but still want the mode line to show how much time is
left, set this variable to nil. Changing the value of this variable
while timeclock information is being displayed in the mode line has no
effect. You should call the function `timeclock-mode-line-display' with
a positive argument to force an update."
:set (lambda (symbol value)
(let ((currently-displaying
(and (boundp 'timeclock-mode-line-display)
timeclock-mode-line-display)))
;; if we're changing to the state that
;; `timeclock-mode-line-display' is already using, don't
;; bother toggling it. This happens on the initial loading
;; of timeclock.el.
(if (and currently-displaying
(or (and value
(boundp 'display-time-hook)
(memq #'timeclock-update-mode-line
display-time-hook))
(and (not value)
timeclock-update-timer)))
(setq currently-displaying nil))
(and currently-displaying
(setq timeclock-mode-line-display nil))
(set symbol value)
(and currently-displaying
(setq timeclock-mode-line-display t))
;; FIXME: The return value isn't used, AFAIK!
value))
:type 'boolean
:require 'time)