diff --git a/Dalamud/Interface/UiBuilder.cs b/Dalamud/Interface/UiBuilder.cs index ab0ad6f6e..3e3694407 100644 --- a/Dalamud/Interface/UiBuilder.cs +++ b/Dalamud/Interface/UiBuilder.cs @@ -120,6 +120,11 @@ namespace Dalamud.Interface set => Service.Get().OverrideGameCursor = value; } + /// + /// Gets the count of Draw calls made since plugin creation. + /// + public ulong FrameCount { get; private set; } = 0; + /// /// Gets or sets a value indicating whether statistics about UI draw time should be collected. /// @@ -283,6 +288,8 @@ namespace Dalamud.Interface this.hasErrorWindow = true; } + this.FrameCount++; + if (DoStats) { this.stopwatch.Stop(); diff --git a/Dalamud/Plugin/DalamudPluginInterface.cs b/Dalamud/Plugin/DalamudPluginInterface.cs index 9fae3c2fc..40894ea25 100644 --- a/Dalamud/Plugin/DalamudPluginInterface.cs +++ b/Dalamud/Plugin/DalamudPluginInterface.cs @@ -48,6 +48,9 @@ namespace Dalamud.Plugin this.configs = Service.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 /// public PluginLoadReason Reason { get; } + /// + /// Gets the time that this plugin was loaded. + /// + public DateTime LoadTime { get; } + + /// + /// Gets the UTC time that this plugin was loaded. + /// + public DateTime LoadTimeUTC { get; } + + /// + /// Gets the timespan delta from when this plugin was loaded. + /// + public TimeSpan DeltaLoadTime => DateTime.Now - this.LoadTime; + /// /// Gets the directory Dalamud assets are stored in. ///