serial: Reduce latency when receiving bytes on Windows
This change reduces the latency between when a byte is received and when it is available to script by configuring the COMMTIMEOUTS structure so that ReadFile() return immediately rather than either waiting for the buffer to be full or a timeout to be exceeded. The previous timeout of 1ms was insufficient because on Windows the minimum timing interval is frequently 16ms and so this introduced a sizable amount of latency. Bug: 1142799 Change-Id: Ie02cb64162dcf7ee178ab9dfcca614d63f79c13e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522196 Auto-Submit: Reilly Grant <reillyg@chromium.org> Reviewed-by:James Hollyer <jameshollyer@chromium.org> Commit-Queue: James Hollyer <jameshollyer@chromium.org> Cr-Commit-Position: refs/heads/master@{#825434}
Showing
Please register or sign in to comment