[gedit-latex] Replaced (last) two more calls to deprecated time.clock()



commit 1c1718868dd1a70569eca1ba9bf39d75ea13fe1e
Author: Pietro Battiston <pbattiston src gnome org>
Date:   Sat Jan 23 18:36:05 2021 +0100

    Replaced (last) two more calls to deprecated time.clock()

 latex/bibtex/editor.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/latex/bibtex/editor.py b/latex/bibtex/editor.py
index 2943844..f9ac816 100644
--- a/latex/bibtex/editor.py
+++ b/latex/bibtex/editor.py
@@ -153,25 +153,26 @@ class BibTeXEditor(Editor, IIssueHandler, JobChangeListener):
 #        self.parse(self._file)
 
         if BENCHMARK:
-            t = time.clock()
+            t = time.perf_counter()
 
         # parse document
         self._document = self._parser.parse(content, self._file, self)
 
         if BENCHMARK:
-            LOG.info("BibTeXParser.parse: %f" % (time.clock() - t))
+            LOG.info("BibTeXParser.parse: %f" % (time.perf_counter() - t))
 
         LOG.debug("Parsed %s bytes of content" % len(content))
 
         # validate
         if BENCHMARK:
-            t = time.clock()
+            t = time.perf_counter()
 
         self._validator.validate(self._document, self._file, self)
 
         # 0.11
         if BENCHMARK:
-            LOG.info("BibTeXValidator.validate: %f" % (time.clock() - t))
+            LOG.info("BibTeXValidator.validate: %f" % (time.perf_counter()
+                                                       - t))
 
         self._outline_view.set_outline(self._document)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]