From 69569fb5b790d7bd6567d8bf4f0ab6664e782380 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Mon, 16 Aug 2004 21:16:16 +0000 Subject: [PATCH] Bug with time instrumentation code. --- Repair/RepairCompiler/MCC/IR/RepairGenerator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Repair/RepairCompiler/MCC/IR/RepairGenerator.java b/Repair/RepairCompiler/MCC/IR/RepairGenerator.java index 5d64040..06252cd 100755 --- a/Repair/RepairCompiler/MCC/IR/RepairGenerator.java +++ b/Repair/RepairCompiler/MCC/IR/RepairGenerator.java @@ -387,6 +387,9 @@ public class RepairGenerator { crhead.outputline("~"+name+"();"); craux.outputline("#include \""+headername+"\""); craux.outputline("#include \"size.h\""); + if (Compiler.TIME) { + craux.outputline("#include "); + } if (Compiler.ALLOCATECPLUSPLUS) { for(Iterator it=state.stTypes.descriptors();it.hasNext();) { TypeDescriptor td=(TypeDescriptor)it.next(); @@ -528,7 +531,7 @@ public class RepairGenerator { cr.endblock(); if (Compiler.TIME) { cr.outputline("gettimeofday(&_end_time,NULL);"); - cr.outputline("printf(\"time=%ld uS\\n\",(_end_time.tv_sec-_begin_time.tv_sec)*1000000+_end_time.tv_usec-_begin_time.tv_usec)"); + cr.outputline("printf(\"time=%ld uS\\n\",(_end_time.tv_sec-_begin_time.tv_sec)*1000000+_end_time.tv_usec-_begin_time.tv_usec);"); } if (Compiler.GENERATEINSTRUMENT) { -- 2.34.1