Explorar o código

Fixed bug in TimeToString utility function

James Peret hai 1 ano
pai
achega
a076f7a289
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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;