Skip to content

Commit

Permalink
Fix instrumentation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
highbyte committed Nov 29, 2023
1 parent 265301e commit f27c760
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/libraries/Highbyte.DotNet6502.Systems/Commodore64/C64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ private C64(ILogger logger)
{
_logger = logger;
_spriteCollisionStat = Instrumentations.Add<ElapsedMillisecondsTimedStat>($"{StatsCategory}-SpriteCollision");

//_audioStat = new ElapsedMillisecondsTimedStat(samples: 1);
//Instrumentations.Add($"{StatsCategory}-Audio", _audioStat);
_audioStat = Instrumentations.Add<ElapsedMillisecondsTimedStat>($"{StatsCategory}-Audio");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ namespace Highbyte.DotNet6502.Instrumentation.Stats;
public class DisposableCallback : IDisposable
{
public event EventHandler? Disposing;
public bool Cont = false;
public bool Cont;

public void Dispose()
{
Disposing?.Invoke(this, new DisposableCallbackEventArgs { Cont = Cont });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void Stop(bool cont = false)
public IDisposable Measure(bool cont = false)
{
Start(cont);
_disposableCallback.Cont = cont;
return _disposableCallback;
}

Expand Down

0 comments on commit f27c760

Please sign in to comment.