Function: timeclock-last-period

timeclock-last-period is a byte-compiled function defined in timeclock.el.gz.

Signature

(timeclock-last-period &optional MOMENT)

Documentation

Return the value of the last event period.

If the last event was a clock-in, the period will be open ended, and growing every second. Otherwise, it is a fixed amount which has been recorded to disk. If MOMENT is non-nil, use that as the current time. This is only provided for coherency when used by timeclock-discrepancy.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/timeclock.el.gz
(defun timeclock-last-period (&optional moment)
  "Return the value of the last event period.
If the last event was a clock-in, the period will be open ended, and
growing every second.  Otherwise, it is a fixed amount which has been
recorded to disk.  If MOMENT is non-nil, use that as the current time.
This is only provided for coherency when used by
`timeclock-discrepancy'."
  (if (equal (car timeclock-last-event) "i")
      (float-time (time-subtract moment (cadr timeclock-last-event)))
    timeclock-last-period))