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

Need a way to get the current remaining time on a looping timer. #116

Open
rakkur opened this issue Jan 15, 2025 · 0 comments
Open

Need a way to get the current remaining time on a looping timer. #116

rakkur opened this issue Jan 15, 2025 · 0 comments

Comments

@rakkur
Copy link

rakkur commented Jan 15, 2025

The LoopingTimer function should return some information about the current loop and how much longer the current waiting period is before it's next execution.

We may also want to consider storing/returning additional info like how many times it has run since initialized, when it was first initialized, etc?

per @rkoshak, this involves:

  1. convert the when data member to a ZDT and store the ZDT in the when property (this.when = time.toZDT(when))
  2. in expire save nextRun to this.when before rescheduling the timer
  3. in getDuration instead of returning the time until/since the time in the Timer, use the time between now and this.when

Reference: #114

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

1 participant