summaryrefslogtreecommitdiff
path: root/django/db/backends/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/utils.py')
-rw-r--r--django/db/backends/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py
index e52d39c69b..2416a458ba 100644
--- a/django/db/backends/utils.py
+++ b/django/db/backends/utils.py
@@ -3,8 +3,8 @@ import decimal
import functools
import hashlib
import logging
+import time
from contextlib import contextmanager
-from time import time
from django.conf import settings
from django.db.utils import NotSupportedError
@@ -105,11 +105,11 @@ class CursorDebugWrapper(CursorWrapper):
@contextmanager
def debug_sql(self, sql=None, params=None, use_last_executed_query=False, many=False):
- start = time()
+ start = time.monotonic()
try:
yield
finally:
- stop = time()
+ stop = time.monotonic()
duration = stop - start
if use_last_executed_query:
sql = self.db.ops.last_executed_query(self.cursor, sql, params)