Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 1169137 - [Stingray] setInterval clock implementation sometimes s… #30789

Merged
merged 1 commit into from Jul 3, 2015

Conversation

begeeben
Copy link
Contributor

@begeeben begeeben commented Jul 2, 2015

…kips a couple seconds

  • Change setInterval to time adjusted setTimeout.

@mozilla-autolander-deprecated
Copy link
Contributor

refresh(new Date());
refresh(now);

self.timeoutId = setTimeout(loop, 1000 - now.getMilliseconds());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about this.timeoutId = setTimeout(this._start.bind(this), 1000 - now.getMilliseconds());
We don't need to nest a function here then.

…kips a couple seconds

* Change setInterval to time adjusted setTimeout.
@mozilla-autolander-deprecated
Copy link
Contributor

begeeben added a commit that referenced this pull request Jul 3, 2015
Bug 1169137 - [Stingray] setInterval clock implementation sometimes sometimes skips a couple seconds, r=rexboy
@begeeben begeeben merged commit 6af34d6 into mozilla-b2g:master Jul 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants