mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
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 <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
13656b60f7
commit
3392b5e276
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user