javascript-tutorial / en.javascript.info

Modern JavaScript Tutorial
https://javascript.info
Other
23.66k stars 3.88k forks source link

Potentially confusing statements #3099

Open Baribj opened 2 years ago

Baribj commented 2 years ago

From the Scheduling: setTimeout and setInterval chapter:

The nested setTimeout guarantees the fixed delay (here 100ms).

Also:

Please note that all scheduling methods do not guarantee the exact delay.

Those two statements seem rather conflicting.

Perhaps the first one should be something along the lines of:

The nested setTimeout (under ideal processor conditions) guarantees the fixed delay (here 100ms).

joaquinelio commented 2 years ago

you are right...

but id suggest, given the context, guarantees... "minimun" delay instead of "exact" delay