summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")