From 0b9626cf610b0a5c034e59c4205d6c531e1eeefb Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 18 Jan 2020 12:21:00 +0100 Subject: [PATCH] Py2: [skip ci] provide time._process_time --- src/App/FreeCADInit.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App/FreeCADInit.py b/src/App/FreeCADInit.py index 70366570c4..336c9cf1d7 100644 --- a/src/App/FreeCADInit.py +++ b/src/App/FreeCADInit.py @@ -247,6 +247,12 @@ except ImportError: FreeCAD.Console.PrintError("\n\nSeems the python standard libs are not installed, bailing out!\n\n") raise +# Backward compatibility to Py2 +import sys +if sys.version_info.major < 3: + import time + time.process_time = time.clock + class FCADLogger(object): '''Convenient class for tagged logging.