🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3253

Surrendering timeslice under DOS?

#3253
From: David James Alexander Hanley
Date: Sun, 03 Jan 1993 09:51
17 lines
974 bytes
  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.
Technical Details
Message-ID: <93003.035144U16244@uicvm.uic.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!uicvm.uic.edu!u16244

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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