소스 검색

Fixed bug in TimeToString utility function

James Peret 1 년 전
부모
커밋
a076f7a289
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  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;