From: kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw (Kuang-Chun Cheng) Newsgroups: comp.os.msdos.djgpp Subject: delay() problem Date: 14 Dec 1996 10:28:01 GMT Organization: Computing Center, Academia Sinica Lines: 27 Message-ID: <58tvfh$l4o@gate.sinica.edu.tw> NNTP-Posting-Host: kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, The delay() declared at dos.h does not work very well on the following codes, #include #include void main() { int count=0; for(;;) { delay(1); cout << ++count << "\r"; cout.flush(); } } At the beginning, the number change very quickly (this is normal, since delay 1/1000 sec per count). However, after running this code for a while (about 30 sec), the counting rate slow down a lot (looks like delay(1) will delay 1/5 sec). After this happened, the delay() never run normally anymore. I must reboot the system to get the correct delay() rate for about 30 sec and then it slow down again. Does anyone have similar behavior??? What's wrong here??? Thanks a lot. Kuang-chun Cheng kccheng AT hep2 DOT phys DOT sinica DOT edu DOT tw