From acae68a20b97b9d2ed695aeb41a6e003e06f1a74 Mon Sep 17 00:00:00 2001 From: dowoge Date: Mon, 13 Mar 2023 19:39:58 -0400 Subject: [PATCH] i love inline --- src/modules/strafes_net.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/strafes_net.lua b/src/modules/strafes_net.lua index 35bd595..0754423 100644 --- a/src/modules/strafes_net.lua +++ b/src/modules/strafes_net.lua @@ -85,11 +85,12 @@ function formatTime(time) -- chatgpt THIS IS FOR SECONDS! NOT MILLISECONDS local seconds = math.floor(time % 60) local milliseconds = math.floor(((time % 1) * 1000)+.5) - if hours > 0 then - return string.format("%02d:%02d:%02d", hours, minutes, seconds) - else - return string.format("%02d:%02d.%03d", minutes, seconds, milliseconds) - end + -- if hours > 0 then + -- return string.format("%02d:%02d:%02d", hours, minutes, seconds) + -- else + -- return string.format("%02d:%02d.%03d", minutes, seconds, milliseconds) + -- end + return string.format(hours and '%02d:%02d:%02d' or '%02d:%02d.%03d', hours and hours or minutes,hours and minutes or seconds, hours and seconds or milliseconds) end