System.Diagnostics.Stopwatch t1
= new System.Diagnostics.Stopwatch();
t1.Start();
SetupUIEvents();
t1.Stop();
Debug.LogWarning($"t1=總運(yùn)行時(shí)間{t1.Elapsed}:總運(yùn)行時(shí)間(毫秒單位){t1.ElapsedMilliseconds}:計(jì)時(shí)器刻度{t1.ElapsedTicks}");
總體來說ElapsedTicks更為精確