From f7e4d08eb083f36a1610575cead39e6d034b4e92 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 9 Aug 2018 10:38:13 +0100 Subject: [PATCH] Switch to using monotonic time in Database.py timing --- Database.py | 4 ++-- 1 file 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",