1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Time format in igc-stats CSV is now configurable

This commit is contained in:
Gerd Möllmann 2024-07-01 20:34:45 +02:00
parent f70c4ca220
commit bd8d9c1aae

View file

@ -247,6 +247,8 @@ the changes to snapshot A. See the modes's help."
(cancel-timer igc--collect-timer)
(setq igc--collect-timer nil)))
(defvar igc-stats-time-format "%T")
(defun igc--collect-stats ()
(let ((buffer (get-file-buffer igc--collect-file)))
(when buffer
@ -255,7 +257,7 @@ the changes to snapshot A. See the modes's help."
(when (= (point-min) (point-max))
(insert (format "\"%s\",\"%s\",\"%s\",\"%s\"\n"
"Time" "Type" "N" "Bytes")))
(cl-loop with time = (current-time-string)
(cl-loop with time = (format-time-string igc-stats-time-format)
for (title n bytes) in (igc-info) do
(insert (format "\"%s\",\"%s\",\"%s\",\"%s\"\n"
time title n bytes))))