Use `org-float-time' instead of `time-to-seconds' in John's patch
This commit is contained in:
parent
dd01f724a6
commit
a45e7d88c7
|
@ -1,3 +1,8 @@
|
||||||
|
2009-10-17 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-clock.el (org-clock-resolve, org-resolve-clocks)
|
||||||
|
(org-emacs-idle-seconds): Use `org-float-time' instead of
|
||||||
|
`time-to-seconds'
|
||||||
|
|
||||||
2009-10-17 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-10-17 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -681,13 +681,13 @@ was started."
|
||||||
" [(kK)eep (sS)ubtract (C)ancel]? ")
|
" [(kK)eep (sS)ubtract (C)ancel]? ")
|
||||||
nil 45)))
|
nil 45)))
|
||||||
char-pressed))))
|
char-pressed))))
|
||||||
(default (floor (/ (time-to-seconds
|
(default (floor (/ (org-float-time
|
||||||
(time-subtract (current-time) last-valid)) 60)))
|
(time-subtract (current-time) last-valid)) 60)))
|
||||||
(keep (and (memq ch '(?k ?K))
|
(keep (and (memq ch '(?k ?K))
|
||||||
(read-number "Keep how many minutes? " default)))
|
(read-number "Keep how many minutes? " default)))
|
||||||
(subtractp (memq ch '(?s ?S)))
|
(subtractp (memq ch '(?s ?S)))
|
||||||
(barely-started-p (< (- (time-to-seconds last-valid)
|
(barely-started-p (< (- (org-float-time last-valid)
|
||||||
(time-to-seconds (cdr clock))) 45))
|
(org-float-time (cdr clock))) 45))
|
||||||
(start-over (and subtractp barely-started-p)))
|
(start-over (and subtractp barely-started-p)))
|
||||||
(if (or (null ch)
|
(if (or (null ch)
|
||||||
(not (memq ch '(?k ?K ?s ?S ?C))))
|
(not (memq ch '(?k ?K ?s ?S ?C))))
|
||||||
|
@ -734,8 +734,8 @@ non-dangling (i.e., currently open and valid) clocks."
|
||||||
(format
|
(format
|
||||||
"Dangling clock started %d mins ago"
|
"Dangling clock started %d mins ago"
|
||||||
(floor
|
(floor
|
||||||
(/ (- (time-to-seconds (current-time))
|
(/ (- (org-float-time (current-time))
|
||||||
(time-to-seconds (cdr clock))) 60))))))
|
(org-float-time (cdr clock))) 60))))))
|
||||||
(or last-valid
|
(or last-valid
|
||||||
(cdr clock)))))))))))
|
(cdr clock)))))))))))
|
||||||
|
|
||||||
|
@ -743,7 +743,7 @@ non-dangling (i.e., currently open and valid) clocks."
|
||||||
"Return the current Emacs idle time in seconds, or nil if not idle."
|
"Return the current Emacs idle time in seconds, or nil if not idle."
|
||||||
(let ((idle-time (current-idle-time)))
|
(let ((idle-time (current-idle-time)))
|
||||||
(if idle-time
|
(if idle-time
|
||||||
(time-to-seconds idle-time)
|
(org-float-time idle-time)
|
||||||
0)))
|
0)))
|
||||||
|
|
||||||
(defun org-mac-idle-seconds ()
|
(defun org-mac-idle-seconds ()
|
||||||
|
|
Loading…
Reference in New Issue