Browse Source

Fixed bug in TimeToString utility function

James Peret 1 year ago
parent
commit
a076f7a289
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Runtime/Utilities.cs

+ 5 - 0
Runtime/Utilities.cs

@@ -28,6 +28,11 @@ namespace KairoEngine.Core
         public static string TimeToString(float time)
         {
             string t = "";
+            if(time < 1)
+            {
+                int miliseconds = (int)(time * 1000);
+                return $"{miliseconds} ms";
+            }
             int minutes = (int)time / 60;
             int hours = (int)minutes / 60;
             minutes = (int)minutes % 60;