mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix get time spent again
This commit is contained in:
parent
fde8760252
commit
e936f9a4e3
1 changed files with 2 additions and 2 deletions
|
@ -1960,7 +1960,7 @@ class OtherCog(commands.Cog):
|
||||||
|
|
||||||
def get_time_spent(nanoseconds: int) -> str:
|
def get_time_spent(nanoseconds: int) -> str:
|
||||||
hours, minutes, seconds = 0, 0, 0
|
hours, minutes, seconds = 0, 0, 0
|
||||||
seconds = nanoseconds * 1e9
|
seconds = nanoseconds / 1e9
|
||||||
if seconds >= 60:
|
if seconds >= 60:
|
||||||
minutes, seconds = divmod(seconds, 60)
|
minutes, seconds = divmod(seconds, 60)
|
||||||
if minutes >= 60:
|
if minutes >= 60:
|
||||||
|
@ -1989,7 +1989,7 @@ class OtherCog(commands.Cog):
|
||||||
|
|
||||||
total_time_spent = get_time_spent(chunk["total_duration"])
|
total_time_spent = get_time_spent(chunk["total_duration"])
|
||||||
eval_time_spent = get_time_spent(chunk["eval_duration"])
|
eval_time_spent = get_time_spent(chunk["eval_duration"])
|
||||||
tokens_per_second = chunk["eval_count"] / (chunk["eval_duration"] * 1e9)
|
tokens_per_second = chunk["eval_count"] / chunk["eval_duration"]
|
||||||
output.add_field(
|
output.add_field(
|
||||||
name="Timings",
|
name="Timings",
|
||||||
value="Total: {}\nEval: {} ({:,.2f}/s)".format(
|
value="Total: {}\nEval: {} ({:,.2f}/s)".format(
|
||||||
|
|
Loading…
Reference in a new issue