/* clock example: countdown */
#include
#include
#include
void wait ( int seconds ) {
clock_t endwait;
endwait = clock () + seconds * CLK_TCK ;
while (clock() < endwait) {}
}
int main () {
int n;
cout << "Starting countdown..." << endl;
for (n=10; n>0; n--) {
cout << n << '\n';
wait (1);
}
cout << "FIRE!!!\n";
return 0;
}