Skip to content

changeTimerClock function can be blocked by other JS on the page #9

@StymiedSloth

Description

@StymiedSloth

Pull Request to replicate the issue : #8

Added code to block main thread during changeTimerClock execution.

Why?

Well, JS is async, to replicate issue when there is a lot of JS code bogging down main thread the popup will take that much longer until the blocking JS code relinquishes the control. Hence, instead of the 60sec auto time out, the pop up could take more than that. Note: The UI also won't be responsive a.k.a jank.

Why no unit test?

I Lazy.

What's a potential solution?

Well, doing setState based on a setInterval might not work out. Maybe use actual timestamps to figure out how long since the last run was done. This might cause the circularLock update to jump a bit but at least the timer is more accurate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions