-
Notifications
You must be signed in to change notification settings - Fork 107
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
periodically has a random initially delay #94
Comments
Either |
Don't quite understand, why would the start time be non-deterministic if initial delay is 0? |
The start is actually deterministic, but because it's undocumented it looks as if it's random. IMHO this is a complementary and potentially quite useful features - your 60sec periods will overlap with 10sec periods every 6th time. 0-delay can always be supplied manually if the user wants so. |
If you are using periodically for logging you will get nice round times which are modulo aligned with the period. So I personally think this feature should stay. It just needs to be documented properly. |
I'll come up with some better documentation, or am happy to take a pull request if you think you can explain it clearly. |
Why does periodically have a random initial delay (less than the period) if none is provided?
(- period (rem (System/currentTimeMillis) period))
I assumed that it would default to 0, to me this is very strange.
The text was updated successfully, but these errors were encountered: