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

[WIP] implementation of templated timer tick #943

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sedictious
Copy link

Addresses #941

Opening this now before continuing with the other timer services because I feel the approach is perhaps breaking too many things.

This adds timer_model.h (name up to change, just wanted to keep it aligned with memory model) that is then used to determine the appropriate type for the ticker, to not limit the resolution to 32bits. I implemented this only for message_timer.h as a proof of concept but the concept can be applied to the rest of the services

The main issue I have with this approach, is that it requires templating timer since interval and state depend on TIMER_MODEL. I couldn't find a way to abstract this without some major refactoring and without not templating timer. If this is a breaking change and there are no proposed alternative and more elegant solutions I'm missing, feel free to reject and close this PR

Otherwise, I can work on cleaning this up and working on the rest of the timers

Copy link

Review changes with SemanticDiff.

@Sedictious Sedictious marked this pull request as draft August 2, 2024 15:18
@Sedictious
Copy link
Author

@jwellbelove Small bump for this because I'm still up for making the changes for all the timers if needed. If you think this is breaking backwards compatibility in an unacceptable way and don't have any clearly alternative in mind I could cancel the PR :/

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