MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMainThreadUpdateRange

Method GetMainThreadUpdateRange

Source/Editor/Windows/Profiler/CPU.cs:255–277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253 }
254
255 private ViewRange GetMainThreadUpdateRange()
256 {
257 if (_events != null && _events.Count != 0)
258 {
259 var threads = _events.Get(_mainChart.SelectedSampleIndex);
260 if (threads != null)
261 {
262 for (int j = 0; j < threads.Length; j++)
263 {
264 var thread = threads[j];
265 if (thread.Name != "Main" || thread.Events == null)
266 continue;
267 for (int i = 0; i < thread.Events.Length; i++)
268 {
269 ref var e = ref thread.Events[i];
270 if (e.Depth == 0 && e.Name == "Update")
271 return new ViewRange(ref e);
272 }
273 }
274 }
275 }
276 return ViewRange.Full;
277 }
278
279 private void AddEvent(double startTime, int maxDepth, float xOffset, int depthOffset, int index, ProfilerCPU.Event[] events, ContainerControl parent)
280 {

Callers

nothing calls this directly

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected