Class Timings
Class for measuring time taken in various subsystems.
Assembly: Dalamud.dll
View Source
Declaration
public static class Timings
Methods
AttachTimingHandle<T>(Func<T>)
Attaches timing handle to a Func{T}.
View Source
Declaration
public static Func<T> AttachTimingHandle<T>(Func<T> task)
Returns
System.Func<<T>>
: Attached task.
Parameters
Type | Name | Description |
---|---|---|
System.Func<<T>> | task | Task to attach. |
Type Parameters
Name | Description |
---|---|
T | Return type. |
AttachTimingHandle(Action)
Attaches timing handle to an Action.
View Source
Declaration
public static Action AttachTimingHandle(Action task)
Returns
System.Action
: Attached task.
Parameters
Type | Name | Description |
---|---|---|
System.Action | task | Task to attach. |
Start(string, string, string, int)
Start a new timing.
View Source
Declaration
public static IDisposable Start(string name, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Returns
System.IDisposable
: Disposable that stops the timing once disposed.
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the timing. |
System.String | memberName | Name of the calling member. |
System.String | sourceFilePath | Name of the calling file. |
System.Int32 | sourceLineNumber | Name of the calling line number. |
Event(string, string, string, int)
Record a one-time event.
View Source
Declaration
public static void Event(string name, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the timing. |
System.String | memberName | Name of the calling member. |
System.String | sourceFilePath | Name of the calling file. |
System.Int32 | sourceLineNumber | Name of the calling line number. |