aboutsummaryrefslogtreecommitdiff
path: root/Database.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-08-09 10:38:13 +0100
committerGravatar jesopo2018-08-09 10:38:13 +0100
commitf7e4d08eb083f36a1610575cead39e6d034b4e92 (patch)
treece4ff5e7b5b334bfea57b87e875cbd6da8eebc83 /Database.py
parentfixed typos in !channelget (diff)
signature
Switch to using monotonic time in Database.py timing
Diffstat (limited to 'Database.py')
-rw-r--r--Database.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Database.py b/Database.py
index 426188e2..8e698bc7 100644
--- a/Database.py
+++ b/Database.py
@@ -244,13 +244,13 @@ class Database(object):
self.bot.events.on("log.debug").call(
message="executing query: \"%s\" (params: %s)",
params=[printable_query, params])
- start = time.time()
+ start = time.monotonic()
cursor = self.cursor()
cursor.execute(query, params)
value = fetch_func(cursor)
- end = time.time()
+ end = time.monotonic()
total_milliseconds = (end - start) * 1000
self.bot.events.on("log.debug").call(
message="executed in %fms",