Skip to content

Fix timestamp not updating occasionally#3066

Merged
compulim merged 3 commits intomicrosoft:masterfrom
compulim:fix-2562
Apr 3, 2020
Merged

Fix timestamp not updating occasionally#3066
compulim merged 3 commits intomicrosoft:masterfrom
compulim:fix-2562

Conversation

@compulim
Copy link
Copy Markdown
Contributor

@compulim compulim commented Apr 2, 2020

Fixes #2562.

Changelog Entry

Description

Chrome may sometimes fire setTimeout before the scheduled time.

In that case, when we calculating the next scheduled time, it will be the same value of the current schedule. In our useTimeout hook, if the scheduled time kept the same, it will not reschedule it.

Thus, some timestamps may stop updating.

We are adding a bit randomness to make sure the next scheduled time is slightly different and will continue to fire.

Specific Changes

  • Updated useForceRenderAtInterval to add randomness on scheduling

  • Testing Added
    • No tests added because it is very time consuming to repro the issue

@compulim compulim merged commit 0b4ee47 into microsoft:master Apr 3, 2020
@compulim compulim deleted the fix-2562 branch April 3, 2020 17:47
@compulim compulim mentioned this pull request May 15, 2020
34 tasks
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.

Incorrect Message Time Reporting

2 participants