Files
ShrinkEventBus/Runtime/ShrinkEventDiagnostic.cs
T
cneicy 901ad18453
Publish UPM package / publish (push) Successful in 3s
Publish NuGet packages / publish (push) Successful in 3m43s
feat: update Godot integration and coordinated package dependencies
2026-11-06 19:13:18 +08:00

38 lines
1.4 KiB
C#

#nullable enable
using System;
using System.Diagnostics;
namespace ShrinkEventBus
{
public readonly struct ShrinkEventDiagnostic
{
internal ShrinkEventDiagnostic(DateTime timestampUtc, Type eventType, ShrinkBusKey busKey,
ShrinkBusSchedulerKind scheduler, ShrinkDispatchMode dispatchMode, int threadId,
long elapsedTimestampTicks, ShrinkPostResult result, bool isAsync)
{
TimestampUtc = timestampUtc;
EventType = eventType;
BusKey = busKey;
Scheduler = scheduler;
DispatchMode = dispatchMode;
ThreadId = threadId;
ElapsedTimestampTicks = elapsedTimestampTicks;
Result = result;
IsAsync = isAsync;
}
public DateTime TimestampUtc { get; }
public Type EventType { get; }
public ShrinkBusKey BusKey { get; }
public ShrinkBusSchedulerKind Scheduler { get; }
public ShrinkDispatchMode DispatchMode { get; }
public int ThreadId { get; }
public long ElapsedTimestampTicks { get; }
public double ElapsedMilliseconds => ElapsedTimestampTicks * 1000d / Stopwatch.Frequency;
public TimeSpan Elapsed => TimeSpan.FromSeconds(ElapsedTimestampTicks / (double)Stopwatch.Frequency);
public ShrinkPostResult Result { get; }
public bool IsAsync { get; }
}
}