From ce66641127aaa44d54f35b6a6e120aecc6ff3180 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Fri, 24 Jun 2022 11:28:46 -0500 Subject: Minor changes in verilogParse.py - remove unused timing vars, change time.time() to time.perf_counter() --- examples/verilogParse.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/verilogParse.py') diff --git a/examples/verilogParse.py b/examples/verilogParse.py index 1755a17..ce65aa7 100644 --- a/examples/verilogParse.py +++ b/examples/verilogParse.py @@ -918,7 +918,6 @@ if __name__ == "__main__": failCount = 0 Verilog_BNF() numlines = 0 - startTime = time.time() fileDir = "verilog" # ~ fileDir = "verilog/new2" # ~ fileDir = "verilog/new3" @@ -940,9 +939,9 @@ if __name__ == "__main__": print(fnam, len(filelines), end=" ") numlines += len(filelines) teststr = "".join(filelines) - time1 = time.time() + time1 = time.perf_counter() tokens = test(teststr) - time2 = time.time() + time2 = time.perf_counter() elapsed = time2 - time1 totalTime += elapsed if len(tokens): @@ -959,7 +958,7 @@ if __name__ == "__main__": failCount += 1 for i, line in enumerate(filelines, 1): print("%4d: %s" % (i, line.rstrip())) - endTime = time.time() + print("Total parse time:", totalTime) print("Total source lines:", numlines) print("Average lines/sec:", ("%.1f" % (float(numlines) / (totalTime + 0.05)))) -- cgit v1.2.1