mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-23 08:17:47 +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>
|
/// </summary>
|
||||||
public FrameworkAddressResolver Address { get; }
|
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>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether to dispatch update events.
|
/// Gets or sets a value indicating whether to dispatch update events.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -173,6 +183,10 @@ namespace Dalamud.Game
|
||||||
|
|
||||||
if (this.DispatchUpdateEvents)
|
if (this.DispatchUpdateEvents)
|
||||||
{
|
{
|
||||||
|
var now = DateTime.Now;
|
||||||
|
this.DeltaFrameworkUpdate = now - this.LastUpdate;
|
||||||
|
this.LastUpdate = now;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (StatsEnabled && this.Update != null)
|
if (StatsEnabled && this.Update != null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue