-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Slowing down and speeding up an interval_timer #3244
Comments
It's mostly a matter of how you interpret Granted, these are unusual semantics (mostly born out of historical necessity) and the functionality is not needed in HPX, currently. I'd suggest we completely remove it. Reversing the use of |
Thanks a lot for your reply Hartmut! So what would you recommend to change the frequency of an interval_timer then? Destroy the old one and create a new one? |
@xaguilar Ahh, so you need this functionality? In this case I'd suggest properly fixing the semantics and implementation of those functions. Would you mind working on this? |
@hkaiser Sure, I can have a look at it. |
This was fixed by merging #3251 |
Hi,
I was checking the code in hpx::util::interval_timer to slow down and speed up a timer and I'm a bit confused.
In the function interval_timer::slow_down for example, the new value is chosen using std::min between the new value and a variation of the old one. For me, slowing down a timer would imply to increase the timer interval, and thus, using a greater value. For example going from 1 microsec to 4 microsecs for the timer. However, using the std::min in slow_down makes the function to never select the new greater value passed to the function (4 microsecs in my previous example). The same happens with interval_timer::speed_up, it uses std::max, thereby never choosing the new smaller time interval to speed up the timer. I'm a bit confused in here, am I getting it wrong or is this a bug?
Thanks a lot!
The text was updated successfully, but these errors were encountered: