Function: tramp-ps-time
tramp-ps-time is a byte-compiled function defined in tramp.el.gz.
Signature
(tramp-ps-time)
Documentation
Read printed time oif "ps" in format "[[DD-]hh:]mm:ss".
Return it as number of seconds. Used in tramp-process-attributes-ps-format.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-ps-time ()
"Read printed time oif \"ps\" in format \"[[DD-]hh:]mm:ss\".
Return it as number of seconds. Used in `tramp-process-attributes-ps-format'."
(search-forward-regexp (rx (+ blank)))
(search-forward-regexp (rx (? (? (group (+ digit)) "-")
(group (+ digit)) ":")
(group (+ digit)) ":"
;; Seconds can also be a floating point num.
(group (+ (any "." digit))))
(line-end-position) 'noerror)
(+ (* 24 60 60 (string-to-number (or (match-string 1) "0")))
(* 60 60 (string-to-number (or (match-string 2) "0")))
(* 60 (string-to-number (or (match-string 3) "0")))
(string-to-number (or (match-string 4) "0"))))