10000 Stopwatch / Countdown - Precise timers by jchavannes · Pull Request #13 · jchavannes/jquery-timer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stopwatch / Countdown - Precise timers #13

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

Closed
wants to merge 2 commits into from
Closed

Conversation

jchavannes
Copy link
Owner

Adding stopwatch and countdown classes for more precise timing while still keeping the original timer class for reverse compatibility.

stopwatch / countdown use the system clock. This enables them to persist through many scenarios, including system hibernate. Note that changes to system clock will effect active time counters.

$.stopwatch(function () {
    $("#some-ele").html(this.getFormattedTime());
});
$.countdown(function() {
    $("#some-ele").html(this.getFormattedTime());
    if (this.isFinished()) {
        alert("Countdown complete!");
    }
}, 20);

@jchavannes
Copy link
Owner Author

New PR: #17

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

Successfully merging this pull request may close these issues.

1 participant
0