home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / amiga / programm / 18122 < prev    next >
Encoding:
Text File  |  1993-01-04  |  1.5 KB  |  35 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!fang!tarpit!bilver!alex
  3. From: alex@bilver.uucp (Alex Matulich)
  4. Subject: Re: Simple C question
  5. Organization: W. J. Vermillion - Winter Park, FL
  6. Date: Mon, 4 Jan 1993 20:36:07 GMT
  7. Message-ID: <1993Jan4.203607.5246@bilver.uucp>
  8. References: <C02JCH.pC@ccu.umanitoba.ca> <marc.01d7@aargh.adsp.sub.org>
  9. Lines: 24
  10.  
  11. marc@aargh.adsp.sub.org (Marc Heuler) writes:
  12. >umbadiu0@ccu.umanitoba.ca (Ted Babiuk) writes:
  13. >>is there something simular to a sleep() command which puts a task to sleep
  14. >>for 'x' ticks? (and uses little/no cpu time?)
  15. >
  16. >There is, it's Delay() of dos.library.
  17.  
  18. I have a similar but more complex question:
  19.  
  20. Is there something similar to Delay() that will put the program to sleep
  21. for a specified period of time but ALSO be interrupted by a keystroke?
  22. I'm using the timer device to do this in an application that must wait for
  23. clock events (the program is a video subtitler for foreign films), and it
  24. would be nice for the program to be able to hear keystrokes *before* the
  25. sleep time has elapsed.
  26.  
  27. I can do it with a busy loop, constantly checking the system time and the
  28. keyboard, but I'd like to avoid this.
  29.  
  30. -- 
  31.  _ |__  Alex Matulich    alex.matulich@oau.org
  32.  /(+__>  Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817
  33. //| \     UUCP:  alex@bilver.uucp   {peora|ge-dab|uunet!tous}!bilver!alex
  34. ///__)     Internet:  alex@bilver.oau.org | alex%bilver@peora.sdc.ccur.com
  35.