mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge pull request #545 from daemitus/countStuff
This commit is contained in:
commit
4f8b0972c8
2 changed files with 25 additions and 0 deletions
|
|
@ -120,6 +120,11 @@ namespace Dalamud.Interface
|
|||
set => Service<InterfaceManager>.Get().OverrideGameCursor = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the count of Draw calls made since plugin creation.
|
||||
/// </summary>
|
||||
public ulong FrameCount { get; private set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether statistics about UI draw time should be collected.
|
||||
/// </summary>
|
||||
|
|
@ -283,6 +288,8 @@ namespace Dalamud.Interface
|
|||
this.hasErrorWindow = true;
|
||||
}
|
||||
|
||||
this.FrameCount++;
|
||||
|
||||
if (DoStats)
|
||||
{
|
||||
this.stopwatch.Stop();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ namespace Dalamud.Plugin
|
|||
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
||||
this.Reason = reason;
|
||||
|
||||
this.LoadTime = DateTime.Now;
|
||||
this.LoadTimeUTC = DateTime.UtcNow;
|
||||
|
||||
this.GeneralChatType = configuration.GeneralChatType;
|
||||
this.Sanitizer = new Sanitizer(dataManager.Language);
|
||||
if (configuration.LanguageOverride != null)
|
||||
|
|
@ -83,6 +86,21 @@ namespace Dalamud.Plugin
|
|||
/// </summary>
|
||||
public PluginLoadReason Reason { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time that this plugin was loaded.
|
||||
/// </summary>
|
||||
public DateTime LoadTime { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the UTC time that this plugin was loaded.
|
||||
/// </summary>
|
||||
public DateTime LoadTimeUTC { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timespan delta from when this plugin was loaded.
|
||||
/// </summary>
|
||||
public TimeSpan DeltaLoadTime => DateTime.Now - this.LoadTime;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the directory Dalamud assets are stored in.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue