Skip to main content
Version: 15.x (API 15) [Current]

Class Timings

Class for measuring time taken in various subsystems.

Assembly: Dalamud.dll​
Declaration
public static class Timings

Methods​

AttachTimingHandle<T>(Func<T>)​

Attaches timing handle to a Func{T}.

Declaration
public static Func<T> AttachTimingHandle<T>(Func<T> task)
Returns​

System.Func<<T>>: Attached task.

Parameters​
TypeNameDescription
System.Func<<T>>taskTask to attach.
Type Parameters​
NameDescription
TReturn type.

AttachTimingHandle(Action)​

Attaches timing handle to an Action.

Declaration
public static Action AttachTimingHandle(Action task)
Returns​

System.Action: Attached task.

Parameters​
TypeNameDescription
System.ActiontaskTask to attach.

Start(string, string, string, int)​

Start a new timing.

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​
TypeNameDescription
System.StringnameThe name of the timing.
System.StringmemberNameName of the calling member.
System.StringsourceFilePathName of the calling file.
System.Int32sourceLineNumberName of the calling line number.

Event(string, string, string, int)​

Record a one-time event.

Declaration
public static void Event(string name, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
Parameters​
TypeNameDescription
System.StringnameThe name of the timing.
System.StringmemberNameName of the calling member.
System.StringsourceFilePathName of the calling file.
System.Int32sourceLineNumberName of the calling line number.