Add mechanism to disable timestamps to allow comparison of output.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 13 Nov 1993 19:24:04 +0000 (19:24 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 13 Nov 1993 19:24:04 +0000 (19:24 +0000)
v7/src/compiler/machines/C/cout.scm

index 89d56a0164548b63179be3d8822fd0ca681f4333..b8ce81a52edd7942c94670ac3aa4fb307c3c03c4 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: cout.scm,v 1.14 1993/11/09 04:30:49 gjr Exp $
+$Id: cout.scm,v 1.15 1993/11/13 19:24:04 gjr Exp $
 
 Copyright (c) 1992-1993 Massachusetts Institute of Technology
 
@@ -38,6 +38,7 @@ MIT in each case. |#
 (declare (usual-integrations))
 \f
 (define *C-procedure-name* 'DEFAULT)
+(define *disable-timestamps?* false)
 
 (define (stringify suffix initial-label lap-code info-output-pathname)
   (define (stringify-object x)
@@ -51,15 +52,17 @@ MIT in each case. |#
           (error "stringify: Unknown frob" x))))
 
   (define (make-time-stamp)
-    (let ((time (get-decoded-time)))
-      (string-append
-       "_"
-       (number->string (decoded-time/second time)) "_"
-       (number->string (decoded-time/minute time)) "_"
-       (number->string (decoded-time/hour time)) "_"
-       (number->string (decoded-time/day time)) "_"
-       (number->string (decoded-time/month time)) "_"
-       (number->string (decoded-time/year time)))))
+    (if *disable-timestamps?*
+       "_timestamp"
+       (let ((time (get-decoded-time)))
+         (string-append
+          "_"
+          (number->string (decoded-time/second time)) "_"
+          (number->string (decoded-time/minute time)) "_"
+          (number->string (decoded-time/hour time)) "_"
+          (number->string (decoded-time/day time)) "_"
+          (number->string (decoded-time/month time)) "_"
+          (number->string (decoded-time/year time))))))
 
   (define (->variable-declarations vars)
     (if (null? vars)