Timeout - setting depends on computer/browser-speed
See original GitHub issueIf I set a timeout of e.g. 5 sec, i.e. 5000 then depending on the computer I have either 8 secs or 30 secs. I guess that it is a timing issue, namely in the NotificationComponent
you have
startTimeOut(): void {
this.steps = this.timeOut / 10;
this.speed = this.timeOut / this.steps;
this.start = new Date().getTime();
this.zone.runOutsideAngular(() => this.timer = setTimeout(this.instance, this.speed));
}
and if I have 5000 ==> steps=500
and the timeout is 10ms. Depending on the accuracy of the clock of the computer (and the load) 10ms might be way to low, especially since the rounding sums up to quite a large number.
Proposed solution:
- Either set from outside the amount of steps manually OR
- Just change the counter of 10 to some more reasonable value, e.g. 50 or 75
I guess with 50ms ==> steps=100
the deviation of few ms would sum up to less than one sec - independent of the load from the computer!
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Set the session inactivity timeout - Dynamics 365
The session inactivity timeout setting represents the amount of time a user can be inactive before the user's session times out and closes....
Read more >QRadar: What is the Persistent Session Timeout setting? - IBM
The Persistent Session Timeout setting can be found under Admin > System ... Timeout because that timeout depends on the user's behavior.
Read more >Setting request timeout (services) | Cloud Run Documentation
For Cloud Run services, the request timeout setting specifies the time within which a response must be returned by services deployed to Cloud...
Read more >K12300: Overview of access policy timeout settings - AskF5
The Inactivity Timeout setting controls how long (in seconds) a client ... but it can be changed depending on the needs of the...
Read more >How do I configure timeouts? - Envoy Proxy
Depending on the deployment additional configuration may be required. HTTP/gRPC¶. Connection timeouts¶. Connection timeouts apply to the entire HTTP connection ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did several changes on the code because if the timing lacks the whole code is a pain in the a**
The following changes fixes some other issues as well cuz it now relies on the passed time span instead of the counted steps. Consequently the dialog closes when the time passed by during hovering - and do NOT continue. I personally prefer this style although I agree this might be worth for discussions…
I guess the 50 ms are reasonable! This fix works on FF as well on Chrome - tested with timeout of 5000. Would be great if this could be a patch!
Changes I did:
Which now ONLY relies on the time passed by, i.e. after each timeout (=25ms) ==> check if the total time passed by ==> if not, continue, if yes, abort… Adjust as well the progressbar according to the total time passed by…
Sorry, cannot create a patch 😕 But the above proposal fixes as well issue #211