From fde8760252605f454ebf7d9742b5e923b91e6ed6 Mon Sep 17 00:00:00 2001 From: nex Date: Sat, 11 Nov 2023 18:51:21 +0000 Subject: [PATCH] Fix get time spent --- cogs/other.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/other.py b/cogs/other.py index 33a01ff..cc5f168 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -1960,7 +1960,7 @@ class OtherCog(commands.Cog): def get_time_spent(nanoseconds: int) -> str: hours, minutes, seconds = 0, 0, 0 - seconds = nanoseconds / 1e9 + seconds = nanoseconds * 1e9 if seconds >= 60: minutes, seconds = divmod(seconds, 60) if minutes >= 60: @@ -1989,7 +1989,7 @@ class OtherCog(commands.Cog): total_time_spent = get_time_spent(chunk["total_duration"]) eval_time_spent = get_time_spent(chunk["eval_duration"]) - tokens_per_second = chunk["eval_count"] / chunk["eval_duration"] + tokens_per_second = chunk["eval_count"] / (chunk["eval_duration"] * 1e9) output.add_field( name="Timings", value="Total: {}\nEval: {} ({:,.2f}/s)".format(