5 private static readonly System.Diagnostics.Stopwatch stopwatch =
6 new System.Diagnostics.Stopwatch();
8 private static void RunWithoutGC(Action action)
10 var savedGCMode = UnityEngine.Scripting.GarbageCollector.GCMode;
12 UnityEngine.Scripting.GarbageCollector.GCMode = UnityEngine
21 UnityEngine.Scripting.GarbageCollector.GCMode = savedGCMode;
34 return stopwatch.ElapsedMilliseconds;
static long MeasureTime(Action action)
Runs the provided action and measures the time it required to finish. Ensures GC will not trigger wh...