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