mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-15 16:07:09 +00:00
don't busy-sleep when paused
This commit is contained in:
parent
06a4bd3961
commit
2d6ca9ce89
@ -1573,7 +1573,7 @@ static void *interface_thread(void *current_key)
|
|||||||
case kPAUSE:
|
case kPAUSE:
|
||||||
while (c_mygetch(1) == -1)
|
while (c_mygetch(1) == -1)
|
||||||
{
|
{
|
||||||
struct timespec ts = { .tv_sec=0, .tv_nsec=1 };
|
struct timespec ts = { .tv_sec=0, .tv_nsec=33333333/*30Hz*/ };
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user