Fix: python agent: 'time' has no attribute 'clock'
[lttng-ust.git] / python-lttngust / lttngust / debug.py
index 6f0e81b17cb690a4754bdd78ca1e6587d6abd939..8ac6b9e5705a2a2d4dc01987dfd9564e942d6d68 100644 (file)
@@ -16,6 +16,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
 
 from __future__ import unicode_literals, print_function
+import lttngust.compat
 import time
 import sys
 import os
@@ -30,12 +31,12 @@ if _ENABLE_DEBUG:
     def _pwarning(msg):
         fname = inspect.stack()[1][3]
         fmt = '[{:.6f}] LTTng-UST warning: {}(): {}'
-        print(fmt.format(time.clock(), fname, msg), file=sys.stderr)
+        print(fmt.format(lttngust.compat._clock(), fname, msg), file=sys.stderr)
 
     def _pdebug(msg):
         fname = inspect.stack()[1][3]
         fmt = '[{:.6f}] LTTng-UST debug: {}(): {}'
-        print(fmt.format(time.clock(), fname, msg), file=sys.stderr)
+        print(fmt.format(lttngust.compat._clock(), fname, msg), file=sys.stderr)
 
     _pdebug('debug is enabled')
 else:
This page took 0.022624 seconds and 4 git commands to generate.