Only print_time when not a unit test or debug_level set

This commit is contained in:
Matt Guthaus 2018-12-07 15:14:28 -08:00
parent 5248482fab
commit 3f468b1c18
1 changed files with 9 additions and 5 deletions

View File

@ -395,6 +395,10 @@ def import_tech():
def print_time(name, now_time, last_time=None, indentation=2): def print_time(name, now_time, last_time=None, indentation=2):
""" Print a statement about the time delta. """ """ Print a statement about the time delta. """
global OPTS
# Don't print during testing
if not OPTS.is_unit_test or OPTS.debug_level>0:
if last_time: if last_time:
time = str(round((now_time-last_time).total_seconds(),1)) + " seconds" time = str(round((now_time-last_time).total_seconds(),1)) + " seconds"
else: else: