diff --git a/Dalamud/Game/Framework.cs b/Dalamud/Game/Framework.cs index c801f85d4..baa8fa84b 100644 --- a/Dalamud/Game/Framework.cs +++ b/Dalamud/Game/Framework.cs @@ -92,6 +92,16 @@ namespace Dalamud.Game /// public FrameworkAddressResolver Address { get; } + /// + /// Gets the last time the Framework Update event was triggered. + /// + public DateTime LastUpdate { get; private set; } = DateTime.MinValue; + + /// + /// Gets the delta between the last Framework Update and the currently executing one. + /// + public TimeSpan UpdateDelta { get; private set; } = TimeSpan.Zero; + /// /// Gets or sets a value indicating whether to dispatch update events. /// @@ -173,6 +183,10 @@ namespace Dalamud.Game if (this.DispatchUpdateEvents) { + var now = DateTime.Now; + this.DeltaFrameworkUpdate = now - this.LastUpdate; + this.LastUpdate = now; + try { if (StatsEnabled && this.Update != null)