![]() |
| | #1 |
| Unleashed Join Date: Sep 2001
Posts: 1,755
| give user time to read messages Code: printf("I am doing a routine...");
system("choice /c:. /t:.,03 /n >NUL");
http://www.cprogramming.com/cboard/s...threadid=15811 Should I look into this post?
__________________ The world is waiting. I must leave you now. |
| Shadow is offline | |
| | #2 |
| Unleashed Join Date: Sep 2001
Posts: 1,755
| > Depends on your OS and compiler Windows 98 SE & GCC.
__________________ The world is waiting. I must leave you now. |
| Shadow is offline | |
| | #3 |
| and the hat of Jobseeking Join Date: Aug 2001 Location: The edge of the known universe
Posts: 21,689
| Something like this Code: #include <stdio.h>
#include <time.h>
#include <conio.h>
void wait_for_key_or_timeout ( int seconds ) {
clock_t endtime = clock() + seconds * CLOCKS_PER_SEC;
while ( !kbhit() && ( clock() < endtime ) );
}
int main ( ) {
int i;
for ( i = 0 ; i < 100 ; i++ ) {
printf( "%d\n", i );
if ( (i+1) % 25 == 0 ) wait_for_key_or_timeout(3);
}
return 0;
}
|
| Salem is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using pointers | Big_0_72 | C Programming | 3 | 10-28-2008 07:51 PM |
| need help in time zone | Gong | C++ Programming | 2 | 01-03-2007 04:44 AM |
| Message class ** Need help befor 12am tonight** | TransformedBG | C++ Programming | 1 | 11-29-2006 11:03 PM |
| Serial Communications in C | ExDigit | Windows Programming | 7 | 01-09-2002 10:52 AM |
| Need to give user more time | Natase | C Programming | 6 | 09-16-2001 05:21 PM |