home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!uicvm.uic.edu!u16244
- Organization: University of Illinois at Chicago
- Date: Sunday, 3 Jan 1993 03:51:44 CST
- From: David James Alexander Hanley <U16244@uicvm.uic.edu>
- Message-ID: <93003.035144U16244@uicvm.uic.edu>
- Newsgroups: comp.os.os2.programmer
- Subject: Surrendering timeslice under DOS?
- Lines: 19
-
- I know there is a way to surrender the rest of a timeslice in an MSDOS
- session under OS/2. I am unable to find out how this is done however.
- I have some DOS programs the I run, but want to leave the CPU as free as
- possible. What I could like to do is this:
-
- (global) int under_os2 = test_under_os2();
-
- {
- ..
- ..
- while ( !kbhit() && !mouse_pressed() )
- if ( under_os2 ) surrender_timeslice();
- }
-
- Okay, that's not the most efficent way, but you see that I mean. It
- drives me nuts to have a dos program that needs 3% of the CPU consuming
- 100% of it.
-
-
-