GetAndStartContextAndTime
Introduction
Code Example
using FlatRedBall.Performance.Measurement;
void CustomInitialize()
{
var section = Section.GetAndStartContextAndTime("Top Level");
SlowFunction1();
SlowFunction2();
Section.EndContextAndTime();
var result = section.ToStringVerbose();
}
private void SlowFunction1()
{
Section.GetAndStartContextAndTime("Function 1");
System.Threading.Thread.Sleep(1000);
Section.EndContextAndTime();
}
private void SlowFunction2()
{
Section.GetAndStartContextAndTime("Function 2");
System.Threading.Thread.Sleep(2000);
Section.EndContextAndTime();
}Section and TimeManager
Last updated
Was this helpful?