Hi, wolf <[email protected]> skribis:
> (define (time proc) > (let* ((start (get-internal-run-time)) > (_ (proc)) > (end (get-internal-run-time))) > (exact->inexact (* 1000 (/ (- end start) > internal-time-units-per-second))))) > > (format #t "Guix: ~ams\nGit: ~ams\n" > (time (λ () (commit-relation c1 c2))) > (time (λ () (shelling-commit-relation c1 c2)))) ‘get-internal-run-time’ returns “units of processor time” used by the current process (info "(guile) Time"). When shelling out, the process calls waitpid(2) and does nothing, so naturally its processor time is close to zero. ‘get-internal-real-time’ should give something closer to elapsed time. Ludo’.
