🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.help
Article #19

Re: Pausing program for specified # of seconds in THINK C

#19
From: Scott A. Johnson
Date: Fri, 25 Aug 1995 14:15
25 lines
1317 bytes
In article <oylerb-2108950003230001@msp1-5.nas.mr.net>,
oylerb@tdkt.skypoint.net (Bill A. Oyler) wrote:

> Is there a toolbox command I can use to "pause" my program for the desired
> number of seconds (or ticks, if necessary)?  All I need to do is pause for
> about 4 seconds while a splash screen is displayed...

Yes, the call you're looking for is Delay and takes two parameters, e.g.:

    // do stuff

    Delay( kFourSecondsInTicks, &finalTicks );

    // continue doing stuff

The first parameter is how long you want to delay (yes, in ticks).
The second is the address of a long into which the system will return
how many ticks have gone by from system startup to the end of 
the delay.

The delay call may or may not "pause" exacty the number of ticks
you specify but it usually won't be off by more than 1 tick.

Hope this helps,
Scott
Technical Details
Message-ID: <devscott-2508950815410001@johnsons.pharos.com>
Path: arc1-ca.pugleaf.net!johnsons.pharos.com!user
References: <oylerb-2108950003230001@msp1-5.nas.mr.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!johnsons.pharos.com!user
From: devscott@pharos-tech.com (Scott A. Johnson)
Newsgroups: comp.sys.mac.programmer.help,comp.lang.c
Subject: Re: Pausing program for specified # of seconds in THINK C
Date: Fri, 25 Aug 1995 08:15:41 -0600
Organization: Pharos Technologies, Inc.
Message-ID: <devscott-2508950815410001@johnsons.pharos.com>
References: <oylerb-2108950003230001@msp1-5.nas.mr.net>
NNTP-Posting-Host: johnsons.pharos.com