summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-06 16:34:26 +0000
committerErik Johnston <erik@matrix.org>2015-01-06 16:34:41 +0000
commit36a2a877e2920a20a679af96cbb1c4d041b89f96 (patch)
treee8b16ae7c448ab80cf5ad9de192fc723f2192d70 /synapse
parentFix typo where we used wrong var. (diff)
downloadsynapse-36a2a877e2920a20a679af96cbb1c4d041b89f96.tar.xz
Use time.time() instead of time.clock()
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/_base.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index a0b7f943fd..f660fc6eaf 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -64,7 +64,7 @@ class LoggingTransaction(object):
             # Don't let logging failures stop SQL from working
             pass
 
-        start = time.clock() * 1000
+        start = time.time() * 1000
         try:
             return self.txn.execute(
                 sql, *args, **kwargs
@@ -73,7 +73,7 @@ class LoggingTransaction(object):
                 logger.exception("[SQL FAIL] {%s}", self.name)
                 raise
         finally:
-            end = time.clock() * 1000
+            end = time.time() * 1000
             sql_logger.debug("[SQL time] {%s} %f", self.name, end - start)
 
 
@@ -93,7 +93,7 @@ class SQLBaseStore(object):
         def inner_func(txn, *args, **kwargs):
             with LoggingContext("runInteraction") as context:
                 current_context.copy_to(context)
-                start = time.clock() * 1000
+                start = time.time() * 1000
                 txn_id = SQLBaseStore._TXN_ID
 
                 # We don't really need these to be unique, so lets stop it from
@@ -109,7 +109,7 @@ class SQLBaseStore(object):
                     logger.exception("[TXN FAIL] {%s}", name)
                     raise
                 finally:
-                    end = time.clock() * 1000
+                    end = time.time() * 1000
                     transaction_logger.debug(
                         "[TXN END] {%s} %f",
                         name, end - start