Blob Blame History Raw
From 9d2e0a40294408764710657e78929c83f2fc0f31 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Wed, 21 Aug 2019 21:48:25 +0200
Subject: [PATCH 6/6] python-pkg: Don't use deprecated time.clock() (RHBZ
 #1718285)

---
 python-pkg/lirc/client.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/python-pkg/lirc/client.py b/python-pkg/lirc/client.py
index 7e069a55..482913cf 100644
--- a/python-pkg/lirc/client.py
+++ b/python-pkg/lirc/client.py
@@ -219,10 +219,10 @@ class RawConnection(AbstractConnection):
     def readline(self, timeout: float = None) -> str:
         ''' Implements AbstractConnection.readline(). '''
         if timeout:
-            start = time.clock()
+            start = time.perf_counter()
         while b'\n' not in self._buffer:
             ready = self._select.select(
-                start + timeout - time.clock() if timeout else timeout)
+                start + timeout - time.perf_counter() if timeout else timeout)
             if ready == []:
                 if timeout:
                     raise TimeoutException(
-- 
2.20.1