diff options
author | Mats Wichmann <mats@linux.com> | 2021-02-09 14:56:56 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-02-09 14:56:56 (GMT) |
commit | 0281d398d5d3369807b6a2aee1ede45c53b3c8e6 (patch) | |
tree | 2cb70c56db9221f5435725084a30e80d55184ed8 /SCons/Script | |
parent | fb7bb3f969698cbbcdb5af7c97f33c4529ba2e09 (diff) | |
download | SCons-0281d398d5d3369807b6a2aee1ede45c53b3c8e6.zip SCons-0281d398d5d3369807b6a2aee1ede45c53b3c8e6.tar.gz SCons-0281d398d5d3369807b6a2aee1ede45c53b3c8e6.tar.bz2 |
[PR #3884] fix some timinng errors from initial submit
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Script')
-rw-r--r-- | SCons/Script/Main.py | 6 | ||||
-rw-r--r-- | SCons/Script/SConscript.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py index 6a794c3..c2e9f7c 100644 --- a/SCons/Script/Main.py +++ b/SCons/Script/Main.py @@ -185,7 +185,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): def execute(self): if print_time: - start_time = time.perf_counter() + start_time = time.time() global first_command_start if first_command_start is None: first_command_start = start_time @@ -193,7 +193,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): if print_time: global cumulative_command_time global last_command_end - finish_time = time.perf_counter() + finish_time = time.time() last_command_end = finish_time cumulative_command_time = cumulative_command_time+finish_time-start_time if print_action_timestamps: @@ -1423,7 +1423,7 @@ def main(): SCons.Taskmaster.dump_stats() if print_time: - total_time = time.perf_counter() - SCons.Script.start_time + total_time = time.time() - SCons.Script.start_time if num_jobs == 1: ct = cumulative_command_time else: diff --git a/SCons/Script/SConscript.py b/SCons/Script/SConscript.py index 321fba3..596fca0 100644 --- a/SCons/Script/SConscript.py +++ b/SCons/Script/SConscript.py @@ -272,7 +272,7 @@ def _SConscript(fs, *files, **kw): try: try: if Main.print_time: - time1 = time.perf_counter() + start_time = time.perf_counter() scriptdata = _file_.read() scriptname = _file_.name _file_.close() @@ -281,8 +281,8 @@ def _SConscript(fs, *files, **kw): pass finally: if Main.print_time: - time2 = time.perf_counter() - print('SConscript:%s took %0.3f ms' % (f.get_abspath(), (time2 - time1) * 1000.0)) + elapsed = time.perf_counter() - start_time + print('SConscript:%s took %0.3f ms' % (f.get_abspath(), elapsed * 1000.0)) if old_file is not None: call_stack[-1].globals.update({__file__:old_file}) |