Times your code and runs a method after Dispose() runs.
public sealed class Profiler :
System.IDisposable
Inheritance System.Object 🡒 Profiler
Implements System.IDisposable
Constructors | |
---|---|
Profiler() | Creates a profiler that will not run any actions. |
Profiler(Action<string>) | Creates a profiler that will run an System.Action<> with a System.String as the resulting parameter when Dispose() runs. |
Profiler(Action<string,LogType>, LogType) | Creates a profiler that will run an System.Action<> with a System.String and UnityEngine.LogType as the resulting parameter when Dispose() runs. |
Profiler(Action<string,TimeSpan>) | Creates a profiler that will run an System.Action<> with a System.String and System.TimeSpan as the resulting parameter when Dispose() runs. |
Profiler(Action<TimeSpan>) | Creates a profiler that will run an System.Action<> with a System.TimeSpan as the resulting parameter when Dispose() runs. |
Profiler(Action<TimeSpan,string>) | Creates a profiler that will run an System.Action<> with a System.String and System.TimeSpan as the resulting parameter when Dispose() runs. |
Profiler(Action) | Creates a profiler that will run an System.Action<> when Dispose() runs. |
Properties | |
---|---|
Elapsed | The current amount of time that has been elapsed since the creation of this Profiler. |
Methods | |
---|---|
~Profiler() | Stops the timer and runs the action. |
Dispose() | Stops the timer and runs the action. |
Stop() | Stops the timer and returns the time elapsed. |