-
Notifications
You must be signed in to change notification settings - Fork 269
Time elapsed since the last execution of a task that has already finished its interactions. #196
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
Comments
Hi @georgevbsantiago - based on the description of Regardless, no - this functionality is not available in TS - I might implement it in the new version. |
In the case mentioned above, the objective is to obtain the time elapsed since the last execution of a task that has already finished its interactions. However, from the context above it would be possible to extract two new implementations:
Thank you for considering this feature. |
I think it is relatively easy for me to capture the exact moment ( |
However, this presents a challenge will Case 2: it is quite possible that task start will be 4294967200 and finish 5 (runtime of 100 ms with a rollover after passing 4,294,967,295 - UINT32_MAX) - finish is less than start.. Brrrr All of those are somewhat edge cases. but yet, they can confuse the logic |
Perhaps the first case (which was the one in my example) is the easiest to implement:
The second case may have many exceptions and complexities.
I believe that the first case would already be an excellent feature to be added. You can assign -1 to tasks that have never been executed or activated. It is not the same use case as |
for better resolution - micros() is a better choice. same rollover issues, but still better timing resolution... |
Cannot use negative numbers - |
Hello, Thank you for this awesome library.
I'm trying to understand if there is a way to get the time elapsed since the last execution of a task that has already finished its interactions.
It would be something similar/equal to the
elapsed()
method from the library TickerIn my use case, I'm checking a set of conditions and one of them is the time elapsed since the last execution of a task that has already finished its interactions.
The way I found to solve my problem:
If there was an approach similar to
elapsed()
from the Ticker library, then I could use this way:Is there something similar to Ticker's
elapsed()
method in the TaskScheduler library?The text was updated successfully, but these errors were encountered: