Fix timing in class type-checking

(make sure the timing goes away if the flag is off)

original commit: ee3e83856c6f6973c29ada0c809a5ecb50d871aa
This commit is contained in:
Asumu Takikawa 2013-08-29 11:23:28 -04:00
parent d78535d187
commit fef7b7b508

View File

@ -43,9 +43,14 @@
e ...))
#'(begin e ...))]))
(define (do-timestamp [str ""])
(log-info (format "TR class time @ ~a: ~a"
str (- (current-inexact-milliseconds) (start-time)))))
(define-syntax (do-timestamp stx)
(syntax-case stx ()
[(_ str)
(if (syntax-local-value #'do-timing)
#'(log-info
(format "TR class time @ ~a: ~a"
str (- (current-inexact-milliseconds) (start-time))))
#'(void))]))
;; Syntax classes for use in functions below
(define-syntax-class name-pair