home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!weiser@pogo.den.mmc.com
- From: weiser@pogo.den.mmc.com (Matt Weiser)
- Subject: Re: best way to pause in app ?
- Message-ID: <1992Nov20.164209.2573@den.mmc.com>
- Sender: news@den.mmc.com (News)
- Nntp-Posting-Host: 129.243.25.22
- Organization: Martin Marietta WIS
- References: <brownlow.722219238@stmartin>
- Date: Fri, 20 Nov 1992 16:42:09 GMT
- Lines: 40
-
- In article <brownlow.722219238@stmartin>, brownlow@informix.com (Keith Brownlow) writes:
- >
- > Is there a toolbox command to make the application wait x number of seconds
- > before continuing processing ? I've tried looping for 1000's of seconds but
- > without doing anything in the loop, it's more or less instantly coming back.
- >
- > Anyone got a simple solution that I've missed in my manuals ?
- > --
- > -------------------------------------------------------------------------------
- > |brownlow@informix.com "Intense !" |
- > |brownlow@wet.com "A repo man's always intense !" |
- > -------------------------------------------------------------------------------
-
- IM Vol II p.384:
-
- PROCEDURE Delay (numTicks: LONGINT; VAR finalTicks: LONGINT);
- Trap macro _Delay
- On entry A0: numTicks (long word)
- On exit D0: finalTicks (long word)
-
- Delay causes the system to wait for the number of ticks (sixtieths of a sec)
- specified by numTicks, and returns in finalTicks the total number of ticks
- from system startup to the end of the delay.
-
- Warning: Don't rely on the duration of the delay being exact; it will
- usually be accurate to within one tick, but may be off by more than that.
- <why is deleted because I don't think it matters in your case>
-
- Example:
- void wait( long numOfSecs )
- {
-
- long numTicks = numOfSecs * 60;
- long fianlTicks;
-
- Delay( numTicks, &finalTicks );
- }
-
- Matt Weiser
- weiser@pogo.den.mmc.com
-