Commit 38e205a25b8f34916a4d3fdb7aef7424745fdd5a
1 parent
e1a23744
win32: do not use all cpu time
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@709 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
1 deletions
vl.c
... | ... | @@ -1529,7 +1529,11 @@ int main_loop(void) |
1529 | 1529 | timeout = 10; |
1530 | 1530 | } |
1531 | 1531 | |
1532 | -#ifndef _WIN32 | |
1532 | +#ifdef _WIN32 | |
1533 | + if (timeout > 0) | |
1534 | + Sleep(timeout); | |
1535 | +#else | |
1536 | + | |
1533 | 1537 | /* poll any events */ |
1534 | 1538 | /* XXX: separate device handlers from system ones */ |
1535 | 1539 | pf = ufds; | ... | ... |