浏览代码

Fixed bug in TimeToString utility function

James Peret 2 年之前
父节点
当前提交
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;