Fix timing in class type-checking

(make sure the timing goes away if the flag is off)
This commit is contained in:
Asumu Takikawa 2013-08-29 11:23:28 -04:00
parent 8331d8c8a2
commit ee3e83856c

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