Mercurial > emacs
comparison src/msdos.c @ 13657:0dd21f630fb0
(sys_select): Check timer once even if input is pending.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 27 Nov 1995 20:05:44 +0000 |
parents | 7714b87119a3 |
children | 45e71ea63d71 |
comparison
equal
deleted
inserted
replaced
13656:b5b44ae33653 | 13657:0dd21f630fb0 |
---|---|
2432 | 2432 |
2433 /* If we are looking only for the terminal, with no timeout, | 2433 /* If we are looking only for the terminal, with no timeout, |
2434 just read it and wait -- that's more efficient. */ | 2434 just read it and wait -- that's more efficient. */ |
2435 if (!timeout) | 2435 if (!timeout) |
2436 { | 2436 { |
2437 while (! detect_input_pending ()) | 2437 do |
2438 check_timer (&t); | 2438 check_timer (&t); /* check timer even if some input is pending */ |
2439 while (!detect_input_pending ()); | |
2439 } | 2440 } |
2440 else | 2441 else |
2441 { | 2442 { |
2442 timeoutval = EMACS_SECS (*timeout) * 100 + EMACS_USECS (*timeout) / 10000; | 2443 timeoutval = EMACS_SECS (*timeout) * 100 + EMACS_USECS (*timeout) / 10000; |
2443 check_timer (&t); | 2444 check_timer (&t); |