mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Reduce latency of poll() on Windows
When polling sockets poll() can now let you know about an event in about 10µs rather than 10ms. If you're not polling sockets then poll() reports console events now in microseconds instead of milliseconds.
This commit is contained in:
parent
a0a404a431
commit
cceddd21b2
5 changed files with 489 additions and 18 deletions
|
@ -89,7 +89,7 @@ int main(int argc, char *argv[]) {
|
|||
// not the case when you use sigprocmask() to block signals which is
|
||||
// useful for kicking the can down the road.
|
||||
WRITE("doing cpu task...\n");
|
||||
for (volatile int i = 0; i < INT_MAX / 5; ++i) {
|
||||
for (volatile int i = 0; i < INT_MAX / 3; ++i) {
|
||||
if (gotsig) {
|
||||
WRITE("\rgot ctrl+c asynchronously\n");
|
||||
exit(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue