Resurrect chronometrist-interval
It was used in my configuration, and has the potential to be used in the program, too.
This commit is contained in:
parent
fdd9cc4a2e
commit
c6fb67f74e
|
@ -250,6 +250,8 @@
|
|||
5. Function - chronometrist-midnight-spanning-p (start-time stop-time)
|
||||
6. Function - chronometrist-seconds-to-hms (seconds)
|
||||
* seconds -> list-duration
|
||||
7. Function - chronometrist-interval (event)
|
||||
* event -> duration
|
||||
*** chronometrist-timer.el
|
||||
1. Internal Variable - chronometrist--timer-object
|
||||
2. Function - chronometrist-timer ()
|
||||
|
|
|
@ -98,6 +98,14 @@ SECONDS must be a positive integer."
|
|||
(h (/ seconds 3600)))
|
||||
(list h m s)))
|
||||
|
||||
(defun chronometrist-interval (event)
|
||||
"Return the period of time covered by EVENT as a time value.
|
||||
EVENT should be a plist (see `chronometrist-file')."
|
||||
(let ((start (plist-get event :start))
|
||||
(stop (plist-get event :stop)))
|
||||
(time-subtract (parse-iso8601-time-string stop)
|
||||
(parse-iso8601-time-string start))))
|
||||
|
||||
(provide 'chronometrist-time)
|
||||
|
||||
;; Local Variables:
|
||||
|
|
Reference in New Issue