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

Timer pause/resume or stop/start as well as remove are not working properly #344

Open
PhiratPlayz opened this issue Apr 8, 2024 · 0 comments

Comments

@PhiratPlayz
Copy link

PhiratPlayz commented Apr 8, 2024

Hey there,

I was trying to customize a timer to make it work as a subathon timer (setting the timer up when somebody subs or donates).

I got a premade script to customize by streamelements in which they use this library...

the first problem is:
If I pause the timer via a pressed button and resume it, it does not resume the countdown where it stopped but with the timestamp of when the resume button is pressed due to how this countdown works.
It always gets the current timestamp and calculates the difference until the end date. So the timer just jumps to the new result of this calculation.

grafik

2nd Problem that occured:
the main purpose of the customization was to make the countdown work half as fast during nights/ when a button is pressed.
If the above thing is fixed one of my attempts to solve this should work (pause the timer for 1 sec and resume it afterwards again). Due to the above mentioned problem it just shows every 2 seconds a 2 second skip.
Since this does not work due to already addressed problems I tried another way on solving this.

The other way was to add every 2 seconds 1 sec to the countdown. But the $('#divID').countdown('remove') does not kill the other instances. It just removes the attachments to the html dom element. so by time more and more countdown instances run in the background. and thus the ram is running full until its too much and the timer just stops working because it cant calculate all of the instances anymore.
So an method to actually killing the instances would be nice to have.

I tried so much different stuff and even had a deep look inside your code but I found nothing that helps me in this case.

Appreciate any help...
Thanks in advance

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