From 3392b5e27635c0693a0cbbda5651e7d6f7e27d53 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 18 Feb 2019 09:37:22 +1000 Subject: [PATCH] tools: switch time.clock() to time.perf_counter() toolbox.py:86: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead Signed-off-by: Peter Hutterer --- tools/toolbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/toolbox.py b/tools/toolbox.py index 3758e568..5a1289cc 100644 --- a/tools/toolbox.py +++ b/tools/toolbox.py @@ -83,8 +83,8 @@ def start_ratbagd(verbosity=0): dbus = Gio.bus_get_sync(Gio.BusType.SYSTEM, None) name_owner = None - start_time = time.clock() - while name_owner is None and time.clock() - start_time < 30: + start_time = time.perf_counter() + while name_owner is None and time.perf_counter() - start_time < 30: proxy = Gio.DBusProxy.new_sync(dbus, Gio.DBusProxyFlags.NONE, None,