-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
Makes task_timer generic #897
Makes task_timer generic #897
Conversation
f49a71a
to
3328412
Compare
I pushed a new version where I increased the timeout of the tasks in the tests. The previous delays were just a handful of milliseconds, and this made the test give false negative sometimes. |
Hi Stefano, I would prefer to have the tick length as constructor parameter like this:
this spares the templated code and is more flexible as it allows also units other than 1 for the std::chrono::duration |
3328412
to
3090a31
Compare
@gittiver I did not understand when you commented on the issue, but now that I see your solution I like it much more than mine. I just pushed a commit that implements your solution. The macOS workflow seems to give false negatives with short interval of times, I set the ticks to be 100 milliseconds, let's see if it's enough. |
Co-authored-by: Gulliver <[email protected]>
3090a31
to
4cbe002
Compare
@gittiver thank you for solving the comments, I haven't had time to do it myself. 👍 |
you are welcome. 👍 |
This pull request attempts to solve #884 by making
taks_timer
generic and introducingdefault_task_timer
andmilliseconds_task_timer
.default_task_timer
just replaces all the previous instances of task timer, whilemilliseconds_task_timer
replaces the use oftask_timer
in the test suite.Using this approach, we no longer need to wait several seconds for the
task_timer
to complete.