Fix call-with-time-logging in (guix-data-service utils)
It was just recording 0.
This commit is contained in:
parent
e394d1d6ad
commit
6235c6e33b
1 changed files with 6 additions and 7 deletions
|
|
@ -32,13 +32,12 @@
|
||||||
|
|
||||||
(define (call-with-time-logging action thunk)
|
(define (call-with-time-logging action thunk)
|
||||||
(simple-format #t "debug: Starting ~A\n" action)
|
(simple-format #t "debug: Starting ~A\n" action)
|
||||||
|
(let ((start-time (current-time)))
|
||||||
(let-values
|
(let-values
|
||||||
((result
|
((result (thunk)))
|
||||||
(thunk)))
|
(let ((time-taken (- (current-time) start-time)))
|
||||||
(let* ((start-time (current-time))
|
|
||||||
(time-taken (- (current-time) start-time)))
|
|
||||||
(simple-format #t "debug: Finished ~A, took ~A seconds\n"
|
(simple-format #t "debug: Finished ~A, took ~A seconds\n"
|
||||||
action time-taken)
|
action time-taken))
|
||||||
(apply values result))))
|
(apply values result))))
|
||||||
|
|
||||||
(define-syntax-rule (with-time-logging action exp ...)
|
(define-syntax-rule (with-time-logging action exp ...)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue