home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / os2 / programm / 7302 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  950 b 

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