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

make timer task call each ${interval} seconds #182

Open
oleksii-volotskov opened this issue Jul 6, 2021 · 3 comments
Open

make timer task call each ${interval} seconds #182

oleksii-volotskov opened this issue Jul 6, 2021 · 3 comments

Comments

@oleksii-volotskov
Copy link
Collaborator

Now it's wait ${interval} seconds

Let say interval 2 seconds
task processing takes 0.5 seconds

Curren solution:
process task - 0.4 sec
sleep - 2.0 sec
process task - 0.5 sec
sleep - 2.0 sec
process task - 0.7 sec
sleep - 2.0 sec

Required solution:
process task - 0.4 sec
sleep - 1.6 sec
process task - 0.5 sec
sleep - 1.5 sec
process task - 0.7 sec
sleep - 1.3 sec

@danylott
Copy link
Contributor

danylott commented Jul 9, 2021

You are right, but what to do if:
process task - 0.4 sec
sleep - 1.6 sec
process task - 1.5 sec
sleep - 0.5 sec
process task - 2.7 sec
sleep - ? sec

  • sleep 0 secs?
  • run another task after 2.0 secs of last process task?

@oleksii-volotskov
Copy link
Collaborator Author

I would rather appreciate having 0 secs sleep.
We could add some custom settings if we need another behaviour

What do you think?

@artas728
Copy link
Collaborator

artas728 commented Feb 7, 2022

@oleksii-volotskov make sense

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

3 participants