diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-16 09:37:25 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-12-16 09:37:25 +0100 |
commit | 64bc937d72e11ca55df5475f88f5b4419bd0d287 (patch) | |
tree | dfb4c64908867f75bd2fff2c601b3354d2eb4d77 /engine/SCons/Script/SConscript.py | |
parent | 4d4007854125818bf3d71ef1a94c9fad3f6c8e0e (diff) | |
parent | 379b7995fe7e7ecd5583d73d8c4e352cd487578c (diff) |
Merge branch 'release/3.0.1-1'3.0.1-1
Diffstat (limited to 'engine/SCons/Script/SConscript.py')
-rw-r--r-- | engine/SCons/Script/SConscript.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engine/SCons/Script/SConscript.py b/engine/SCons/Script/SConscript.py index 350772e..b366c4c 100644 --- a/engine/SCons/Script/SConscript.py +++ b/engine/SCons/Script/SConscript.py @@ -5,8 +5,6 @@ files. """ -from __future__ import print_function - # # Copyright (c) 2001 - 2017 The SCons Foundation # @@ -29,7 +27,7 @@ from __future__ import print_function # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Script/SConscript.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog" +__revision__ = "src/engine/SCons/Script/SConscript.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog" import SCons import SCons.Action @@ -46,12 +44,15 @@ import SCons.Script.Main import SCons.Tool import SCons.Util +from . import Main + import collections import os import os.path import re import sys import traceback +import time class SConscriptReturn(Exception): pass @@ -249,11 +250,17 @@ def _SConscript(fs, *files, **kw): try: try: # _file_ = SCons.Util.to_str(_file_) + if Main.print_time: + time1 = time.time() exec(compile(_file_.read(), _file_.name, 'exec'), call_stack[-1].globals) except SConscriptReturn: pass finally: + if Main.print_time: + time2 = time.time() + print('SConscript:%s took %0.3f ms' % (f.get_abspath(), (time2 - time1) * 1000.0)) + if old_file is not None: call_stack[-1].globals.update({__file__:old_file}) else: |