Personal website Rudolf Adamkovič

Home / Personal / Exercise log


Average exercise duration

… is the artihmetic mean of all exercise durations

\begin{equation*} \frac{\sum_{d \in D} f(d)}{60 \thinspace |D|} \approx \boxed{41.81} \, \text{minutes}, \end{equation*}

computed by

(defun my-average-exercise-duration ()
  "Return the average exercise duration in minutes."
  (let ((log (my-exercise-log)))
    (format "%0.2f"
            (/ (let ((total-duration 0))
                 (maphash (lambda (day duration)
                            (setq total-duration
                                  (+ total-duration duration)))
                          log)
                 total-duration)
               (* 60 (hash-table-count log))))))

© 2025 Rudolf Adamkovič under GNU General Public License version 3.
Made with Emacs and secret alien technologies of yesteryear.