diff options
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: |