Use time-apply rather than current-inexact-milliseconds

This commit is contained in:
Tony Garnock-Jones 2015-06-18 16:39:13 -04:00
parent bfa04b3f13
commit 23d5036095
2 changed files with 8 additions and 10 deletions

View File

@ -26,11 +26,10 @@
(gestalt-union (pub (presence id))
(sub (presence ?) #:level 1))))
(define start-time (current-inexact-milliseconds))
(run-ground (for/list [(id (in-range peer-count))] (peer id)))
(define stop-time (current-inexact-milliseconds))
(define delta (- stop-time start-time))
(values routing-update-count delta))
(define boot-actions (for/list [(id (in-range peer-count))] (peer id)))
(define-values (results cpu-time wall-clock-time gc-time)
(time-apply (lambda () (run-ground boot-actions)) '()))
(values routing-update-count (max 1 (- cpu-time gc-time))))
(module+ main
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart" "observe-all-minimart"))

View File

@ -26,11 +26,10 @@
(pub (presence id))
(sub (advertise (presence ?)))))
(define start-time (current-inexact-milliseconds))
(run-ground (for/list [(id (in-range peer-count))] (peer id)))
(define stop-time (current-inexact-milliseconds))
(define delta (- stop-time start-time))
(values routing-update-count delta))
(define boot-actions (for/list [(id (in-range peer-count))] (peer id)))
(define-values (results cpu-time wall-clock-time gc-time)
(time-apply (lambda () (run-ground boot-actions)) '()))
(values routing-update-count (max 1 (- cpu-time gc-time))))
(module+ main
(define E (standard-logbook-entry (default-logbook #:verbose? #t) "minimart" "observe-all-prospect"))