Commit 7e944040 authored by Jack Jansen's avatar Jack Jansen

Only go into eventloop/interrupt check 10 times per second

parent 4f27a55e
......@@ -351,11 +351,20 @@ scan_event_queue(flush)
}
}
#define TICKCOUNT 6
int
PyOS_InterruptOccurred()
{
static unsigned long nextticktime;
unsigned long curticktime;
if (PyMac_DoYieldEnabled < 0)
return 0;
curticktime = (unsigned long)LMGetTicks();
if ( curticktime < nextticktime )
return 0;
nextticktime = curticktime + TICKCOUNT;
#ifdef THINK_C
scan_event_queue(1);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment