Function: mpc-secs-to-time
mpc-secs-to-time is a byte-compiled function defined in mpc.el.gz.
Signature
(mpc-secs-to-time SECS)
Source Code
;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-secs-to-time (secs)
;; We could use `format-seconds', but it doesn't seem worth the trouble
;; because we'd still need to check (>= secs (* 60 100)) since the special
;; %z only allows us to drop the large units for small values but
;; not to drop the small units for large values.
(if (stringp secs) (setq secs (string-to-number secs)))
(if (>= secs (* 60 100)) ;More than 100 minutes.
(format "%dh%02d" ;"%d:%02d:%02d"
(/ secs 3600) (% (/ secs 60) 60)) ;; (% secs 60)
(format "%d:%02d" (/ secs 60) (% secs 60))))