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

Question: changing reaction time #26

Open
wjquigs11 opened this issue Jun 17, 2024 · 1 comment
Open

Question: changing reaction time #26

wjquigs11 opened this issue Jun 17, 2024 · 1 comment

Comments

@wjquigs11
Copy link

Am I correct to assume that if I configure a reaction with:
RepeatReaction app.onRepeat(uint32_t t, react_callback cb);
The time (t) is fixed, and the only way to change the repeat time is to delete the reaction and recreate?

@mairas
Copy link
Owner

mairas commented Jun 17, 2024

Yes, at the moment that is the case. Due to the way std::priority_queues, the data structure that keeps track of sorted TimedReactions, work, changing the time would have to be done basically by removing and reinserting. Setting the future interval, however, would be trivial. I don't have time to do it myself but would be happy to review and merge a PR that would do that.

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

No branches or pull requests

2 participants