mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
feat: expose loading time/delta
This commit is contained in:
parent
b0f2486215
commit
c04747375f
1 changed files with 18 additions and 0 deletions
|
|
@ -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