Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate handling of temporal context and metronome #7

Merged
merged 13 commits into from
May 4, 2021

Conversation

edevoogd
Copy link
Owner

@edevoogd edevoogd commented Apr 18, 2021

Some of the more intricate pieces of ClockQuantizer were pulled out and wrapped in a TemporalContextDriver shim that abstracts the following items:

  • Attach to an external ISystemClockTemporalContext, if one is provided
  • Standardized exposure of ClockAdjusted and MetronomeTicked events
  • Standing up an "internal" metronome if there is no external ISystemClockTemporalContext or if a provided ISystemClockTemporalContext does not provide a metronome.
  • Quiescing support
    • Stopping any metronome events being fired from it. On top of this, if the TemporalContextDriver provides the "internal" metronome, timer resources are freed up while in quiescent state.
    • Retaining (buffering) only the last "clock adjusted" occurrence until the TemporalContextDriver is taken out of quiescing state
  • Accounting for discrepancies in (absent) IAsyncDisposable support of System.Threading.Timer between TFMs

In order to clean things up a bit more, bool ISystemClockTemporalContext.ProvidesMetronome was changed to TimeSpan? ISystemClockTemporalContext.MetronomeIntervalTimeSpan. This allows implementers to not only specify the fact that an external metronome is being provided, but also its interval time-span.

@edevoogd edevoogd marked this pull request as draft April 18, 2021 11:23
@edevoogd edevoogd marked this pull request as ready for review May 4, 2021 01:30
@edevoogd edevoogd merged commit 9158c88 into develop May 4, 2021
@edevoogd edevoogd deleted the dev/quantizer-driver branch May 4, 2021 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant