diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2001-02-11 01:08:04 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2001-02-11 01:08:04 (GMT) |
commit | 8a38714ba05a3734f812bb1bbebdc527732a22bc (patch) | |
tree | 90f53048b00a22476549e1ef3c38470fca66e3c7 /Mac/Python/macglue.c | |
parent | 6a9aec47b72cf42bed0f845e751eb243f85b43d6 (diff) | |
download | cpython-8a38714ba05a3734f812bb1bbebdc527732a22bc.zip cpython-8a38714ba05a3734f812bb1bbebdc527732a22bc.tar.gz cpython-8a38714ba05a3734f812bb1bbebdc527732a22bc.tar.bz2 |
Bit the bullet and added a private GUSISIOUX for Python. This makes the delayconsole and keepopen code neater. Also tells Sioux to behave better with events, and handles cmd-. during print better. The pythonpreferences have also changed due to this.
Diffstat (limited to 'Mac/Python/macglue.c')
-rw-r--r-- | Mac/Python/macglue.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index ade635e..6321421 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -539,6 +539,25 @@ PyErr_CheckSignals() return 0; } +#if 0 +/* +** This routine is called if we know that an external library yielded +** to background tasks, so we shouldn't count that time in our computation +** of how much CPU we used. +** This happens with SIOUX, and the routine is called from our modified +** GUSISIOUX. +*/ +void +PyMac_LibraryDidYield(int howlong) +{ + unsigned long maxnextcheck = (unsigned long)LMGetTicks() + schedparams.check_interval; + + schedparams.next_check = schedparams.next_check + howlong; + if (schedparams.next_check > maxnextcheck ) + schedparams.next_check = maxnextcheck; +} +#endif + int PyOS_InterruptOccurred() { |