Skip to main content

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
TypeNameDescription
System.Func<<T>>taskTask to attach.
Type Parameters
NameDescription
TReturn type.

AttachTimingHandle(Action)

Attaches timing handle to an Action.

View Source
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.

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
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.

View Source
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.