Commit fe54bc7
committed
lib: use Timer.now() in readline module
Using Date.now() introduces problems when operating under load or
otherwise with constrained resources. Use Timer.now() to mitigate.
The problem was identified in `test-readline-interface` where under
heavy load, `\r` and `\n` were received so far apart that they were
treated as separate line endings rather than a single line ending.
Switching to `Timer.now()` prevented this from happening.
PR-URL: #14681
Refs: #14674
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>1 parent 02371c7 commit fe54bc7
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
409 | 411 | | |
410 | 412 | | |
411 | 413 | | |
412 | | - | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| |||
422 | 424 | | |
423 | 425 | | |
424 | 426 | | |
425 | | - | |
| 427 | + | |
426 | 428 | | |
427 | 429 | | |
428 | 430 | | |
| |||
916 | 918 | | |
917 | 919 | | |
918 | 920 | | |
919 | | - | |
| 921 | + | |
920 | 922 | | |
921 | 923 | | |
922 | 924 | | |
923 | 925 | | |
924 | 926 | | |
925 | 927 | | |
926 | | - | |
| 928 | + | |
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
| |||
0 commit comments