mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-23 00:49:17 +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;
|
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>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether statistics about UI draw time should be collected.
|
/// Gets or sets a value indicating whether statistics about UI draw time should be collected.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -283,6 +288,8 @@ namespace Dalamud.Interface
|
||||||
this.hasErrorWindow = true;
|
this.hasErrorWindow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.FrameCount++;
|
||||||
|
|
||||||
if (DoStats)
|
if (DoStats)
|
||||||
{
|
{
|
||||||
this.stopwatch.Stop();
|
this.stopwatch.Stop();
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ namespace Dalamud.Plugin
|
||||||
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
this.configs = Service<PluginManager>.Get().PluginConfigs;
|
||||||
this.Reason = reason;
|
this.Reason = reason;
|
||||||
|
|
||||||
|
this.LoadTime = DateTime.Now;
|
||||||
|
this.LoadTimeUTC = DateTime.UtcNow;
|
||||||
|
|
||||||
this.GeneralChatType = configuration.GeneralChatType;
|
this.GeneralChatType = configuration.GeneralChatType;
|
||||||
this.Sanitizer = new Sanitizer(dataManager.Language);
|
this.Sanitizer = new Sanitizer(dataManager.Language);
|
||||||
if (configuration.LanguageOverride != null)
|
if (configuration.LanguageOverride != null)
|
||||||
|
|
@ -83,6 +86,21 @@ namespace Dalamud.Plugin
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PluginLoadReason Reason { get; }
|
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>
|
/// <summary>
|
||||||
/// Gets the directory Dalamud assets are stored in.
|
/// Gets the directory Dalamud assets are stored in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue