mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
feat: expose framework timing
This commit is contained in:
parent
bd48297745
commit
7768a9c1d9
1 changed files with 14 additions and 0 deletions
|
|
@ -92,6 +92,16 @@ namespace Dalamud.Game
|
|||
/// </summary>
|
||||
public FrameworkAddressResolver Address { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the last time the Framework Update event was triggered.
|
||||
/// </summary>
|
||||
public DateTime LastUpdate { get; private set; } = DateTime.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the delta between the last Framework Update and the currently executing one.
|
||||
/// </summary>
|
||||
public TimeSpan UpdateDelta { get; private set; } = TimeSpan.Zero;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to dispatch update events.
|
||||
/// </summary>
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue