System.Diagnostics;
Stopwatch sw = new Stopwatch();
sw.Start();
TestMethod();
sw.Stop();
UnityEngine.Debug.Log(string.Format("total: {0} ms",sw.ElapsedMilliseconds));
System.Diagnostics;
Stopwatch sw = new Stopwatch();
转载于:https://www.cnblogs.com/AlanCheng/p/5534584.html