diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2016-07-24 12:49:32 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-07-25 02:37:06 +0200 |
commit | efb249b056fe7ff6a4788de510cf6c344f20612c (patch) | |
tree | 1820968952146bc8720dae4bb88429983ac36f16 /src | |
parent | 69e9709b33f05c167b17b7eb3455961e46dcee95 (diff) | |
download | cuirass-efb249b056fe7ff6a4788de510cf6c344f20612c.tar cuirass-efb249b056fe7ff6a4788de510cf6c344f20612c.tar.gz |
evaluate: Use (cuirass ...) modules.
This avoids code duplication.
Diffstat (limited to 'src')
-rw-r--r-- | src/cuirass/base.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 666757e..496997a 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -47,8 +47,10 @@ values." (define (call-with-time-display thunk) "Call THUNK and write to the current output port its duration." (call-with-time thunk - (λ (time . results) - (format #t "~,3f seconds~%" - (+ (time-second time) - (/ (time-nanosecond time) 1e9))) - (apply values results)))) + (λ (time result) + (let ((duration (+ (time-second time) + (/ (time-nanosecond time) 1e9)))) + (format (current-error-port) "evaluate '~A': ~,3f seconds~%" + (assq-ref result #:job-name) + duration) + (acons #:duration duration result))))) |