Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- OSLIB v1.05 - <b>ol_yield()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 OL_Yield()
 Return a time slice back to the operating system.
------------------------------------------------------------------------------

 Syntax

       OL_Yield()

 Arguments

      None.

 Returns

      Nothing.

 Description

      OL_Yield() can be used to return time slices back to operating
      systems such as OS/2 and operating environments such as Windows.
      By doing this your application will generate less CPU load and
      make your whole machine run just a little smoother.

      This function is best used in a wait state in your application
      and should be called as many times as possible while it is waiting
      for input.

      It is safe to call this function even if you are not running your
      application under OS/2 or Windows.

 Examples

      // When you may have done this:

      nKey := InKey( 0 )

      // It is now better to do this:

      While nextkey() == 0
         OL_Yield()
      End
      nKey := InKey()


 Source: YIELD.ASM

 Author: Sz.l Viktor <vector@mail.matav.hu>

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson