summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-10-26 20:36:30 +0200
committerJose <jose@zeroc.com>2018-10-26 20:36:30 +0200
commitdc424019d0ea576899ed93160fa0a40abfe476c7 (patch)
treeb9374091b12ca8684551ebc156baf4a88d7c2c15
parentDo not use imp.new_module deprecated since Python 3.4 (diff)
downloadice-dc424019d0ea576899ed93160fa0a40abfe476c7.tar.bz2
ice-dc424019d0ea576899ed93160fa0a40abfe476c7.tar.xz
ice-dc424019d0ea576899ed93160fa0a40abfe476c7.zip
Do not use time.clock() with Python >= 3.3 as it is deprecated
-rw-r--r--python/test/Ice/timeout/AllTests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python/test/Ice/timeout/AllTests.py b/python/test/Ice/timeout/AllTests.py
index 69e78ccef94..15b21c8c70f 100644
--- a/python/test/Ice/timeout/AllTests.py
+++ b/python/test/Ice/timeout/AllTests.py
@@ -285,9 +285,10 @@ def allTests(helper, communicator):
comm = Ice.initialize(initData)
connection = comm.stringToProxy(sref).ice_getConnection()
controller.holdAdapter(-1)
- now = time.clock()
+ s = time.perf_counter() if sys.version_info[:2] >= (3, 3) else time.clock()
comm.destroy()
- test((time.clock() - now) < 1.0)
+ e = time.perf_counter() if sys.version_info[:2] >= (3, 3) else time.clock()
+ test((s - e) < 1.0)
controller.resumeAdapter()
print("ok")