Thread: Re: [Dev-C++] Sleep function not working properly
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: <JM...@ed...> - 2000-10-04 09:41:08
|
The sleep function should count seconds. That is the standard. The delay function is used to wait milli-seconds. Jonathan "Jay Silverman" <jas...@at...> on 04/10/2000 11:26:53 AM Please respond to dev...@li... To: dev...@li... cc: (bcc: Jonathan Murray/Edgars/ZA) Subject: Re: [Dev-C++] Sleep function not working properly It doesn't count seconds, it counts milliseconds (?). 1000 = 1 second :) *Jemini* ~Jay~ ----- Original Message ----- From: <JM...@ed...> To: <dev...@li...> Sent: Wednesday, October 04, 2000 5:10 AM Subject: [Dev-C++] Sleep function not working properly Hello, I have just started using Dev-C++ and notice that when I call the sleep function in my programs, it does not halt execution for the given amount of seconds. I have experimented with very large timeframes (eg. 2000 seconds) and sleep starts to work. But 2000 seconds causes a wait of about 2 seconds. I am doing DOS console programs in C and then running them under Windows 95. Any ideas? Thanks Jonathan _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: <JM...@ed...> - 2000-10-04 10:28:16
|
On my machine, sleep(5000) causes a wait of 5 seconds (or 5000 milli-seconds if you like). But the argument to the sleep function is supposed to be in seconds NOT milli-seconds. The delay function, by standards, is for milli-second waits. "Jay Silverman" <jas...@at...> on 04/10/2000 11:48:40 AM Please respond to dev...@li... To: dev...@li... cc: (bcc: Jonathan Murray/Edgars/ZA) Subject: Re: [Dev-C++] Sleep function not working properly Not when I used it. Try 5000, what happens? *Jemini* ~Jay~ ----- Original Message ----- From: <JM...@ed...> To: <dev...@li...> Sent: Wednesday, October 04, 2000 5:39 AM Subject: Re: [Dev-C++] Sleep function not working properly The sleep function should count seconds. That is the standard. The delay function is used to wait milli-seconds. Jonathan _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Ioannis V. <jv...@at...> - 2000-10-04 10:46:28
|
I am not programming windows applications yet, but what is that "standard" which says that sleep() had to be in seconds? Ioannis > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > JM...@ed... > Sent: Wednesday, October 04, 2000 12:26 PM > To: dev...@li... > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > On my machine, sleep(5000) causes a wait of 5 seconds (or 5000 > milli-seconds if > you like). > But the argument to the sleep function is supposed to be in seconds NOT > milli-seconds. > The delay function, by standards, is for milli-second waits. |
From: <JM...@ed...> - 2000-10-04 11:36:36
|
All Unix compilers I have ever worked with as well as Borland's Turbo C compiler implements the sleep function in seconds. Why is Dev-C++ different? "Ioannis Vranos" <jv...@at...> on 04/10/2000 01:47:18 PM Please respond to dev...@li... To: dev...@li... cc: (bcc: Jonathan Murray/Edgars/ZA) Subject: RE: [Dev-C++] Sleep function not working properly I am not programming windows applications yet, but what is that "standard" which says that sleep() had to be in seconds? Ioannis > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > JM...@ed... > Sent: Wednesday, October 04, 2000 12:26 PM > To: dev...@li... > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > On my machine, sleep(5000) causes a wait of 5 seconds (or 5000 > milli-seconds if > you like). > But the argument to the sleep function is supposed to be in seconds NOT > milli-seconds. > The delay function, by standards, is for milli-second waits. _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Ioannis V. <no...@ya...> - 2000-10-04 11:48:21
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > JM...@ed... > Sent: Wednesday, October 04, 2000 1:35 PM > To: dev...@li... > Subject: RE: [Dev-C++] Sleep function not working properly > > > > > All Unix compilers I have ever worked with as well as Borland's > Turbo C compiler > implements the sleep function in seconds. > Why is Dev-C++ different? Basically, Dev-C++ is the editor. The compiler of Dev-C++ is the mingw32 compiler (the gcc port for windows). Ioannis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: <JM...@ed...> - 2000-10-04 11:55:28
|
Okay, if you want to get symantical, why is mingw32 different? "Ioannis Vranos" <no...@ya...> on 04/10/2000 02:49:12 PM Please respond to dev...@li... To: dev...@li... cc: (bcc: Jonathan Murray/Edgars/ZA) Subject: RE: [Dev-C++] Sleep function not working properly > -----Original Message----- > From: dev...@li... > [mailto:dev...@li...]On Behalf Of > JM...@ed... > Sent: Wednesday, October 04, 2000 1:35 PM > To: dev...@li... > Subject: RE: [Dev-C++] Sleep function not working properly > > > > > All Unix compilers I have ever worked with as well as Borland's > Turbo C compiler > implements the sleep function in seconds. > Why is Dev-C++ different? Basically, Dev-C++ is the editor. The compiler of Dev-C++ is the mingw32 compiler (the gcc port for windows). Ioannis _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Dev-cpp-users mailing list Dev...@li... http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Darel F. <my...@Ma...> - 2000-10-04 12:36:20
|
It's not different. GCC is THE standard C/C++ compiler for several places. It has been used in numerous free and commercial projects. Is the sleep() function defined in the standard library? If so, that may be where the "problem" lies. I have noticed several changes over the past few months to libstdc++, which is supposed to be the implementation of the standard C++ library. JM...@ed... wrote: > Okay, if you want to get symantical, why is mingw32 different? > > "Ioannis Vranos" <no...@ya...> on 04/10/2000 02:49:12 PM > > Please respond to dev...@li... > > To: dev...@li... > cc: (bcc: Jonathan Murray/Edgars/ZA) > Subject: RE: [Dev-C++] Sleep function not working properly > > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...]On Behalf Of > > JM...@ed... > > Sent: Wednesday, October 04, 2000 1:35 PM > > To: dev...@li... > > Subject: RE: [Dev-C++] Sleep function not working properly > > > > > > > > > > All Unix compilers I have ever worked with as well as Borland's > > Turbo C compiler > > implements the sleep function in seconds. > > Why is Dev-C++ different? > > Basically, Dev-C++ is the editor. The compiler of Dev-C++ is the mingw32 > compiler (the gcc port for windows). > > Ioannis > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |
From: Sherman B. <She...@cl...> - 2000-10-05 22:36:01
|
I'm just starting with C++ and Dev C++ but if you think that the GNU compiler is not ANSI compliant you might want to look at: http://gcc.gnu.org/ If there is a bug you should report it. Good luck! >From: <JM...@ed...> >To: dev...@li... >Date: Wed, 4 Oct 2000 11:10:17 +0200 >Subject: [Dev-C++] Sleep function not working properly >Reply-To: dev...@li... > > > >Hello, > >I have just started using Dev-C++ and notice that when I call the sleep function >in my programs, it does not halt execution for the given amount of seconds. >I have experimented with very large timeframes (eg. 2000 seconds) and sleep >starts to work. But 2000 seconds causes a wait of about 2 seconds. >I am doing DOS console programs in C and then running them under Windows 95. > >Any ideas? > >Thanks >Jonathan |
From: Jay S. <jas...@at...> - 2000-10-04 09:50:09
|
Not when I used it. Try 5000, what happens? *Jemini* ~Jay~ ----- Original Message ----- From: <JM...@ed...> To: <dev...@li...> Sent: Wednesday, October 04, 2000 5:39 AM Subject: Re: [Dev-C++] Sleep function not working properly The sleep function should count seconds. That is the standard. The delay function is used to wait milli-seconds. Jonathan |
From: printf c. <pi...@ho...> - 2000-10-04 10:28:56
|
whats the difference between a milisecond and a jiffie? ----- Original Message ----- From: <JM...@ed...> To: <dev...@li...> Sent: Wednesday, October 04, 2000 10:39 AM Subject: Re: [Dev-C++] Sleep function not working properly > > > The sleep function should count seconds. That is the standard. > The delay function is used to wait milli-seconds. > > Jonathan > > > > > > "Jay Silverman" <jas...@at...> on 04/10/2000 11:26:53 AM > > Please respond to dev...@li... > > To: dev...@li... > cc: (bcc: Jonathan Murray/Edgars/ZA) > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > It doesn't count seconds, it counts milliseconds (?). 1000 = 1 second :) > > > *Jemini* ~Jay~ > ----- Original Message ----- > From: <JM...@ed...> > To: <dev...@li...> > Sent: Wednesday, October 04, 2000 5:10 AM > Subject: [Dev-C++] Sleep function not working properly > > > > > Hello, > > I have just started using Dev-C++ and notice that when I call the sleep > function > in my programs, it does not halt execution for the given amount of seconds. > I have experimented with very large timeframes (eg. 2000 seconds) and sleep > starts to work. But 2000 seconds causes a wait of about 2 seconds. > I am doing DOS console programs in C and then running them under Windows 95. > > Any ideas? > > Thanks > Jonathan > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |
From: Peter S. <lo...@nm...> - 2000-10-04 20:02:06
|
a jiffy is 1/100 second, a millisecond is 1/1000 second, so 1 jiffy = 10 milliseconds. On Wed, 4 Oct 2000, printf cout wrote: > whats the difference between a milisecond and a jiffie? > ----- Original Message ----- > From: <JM...@ed...> > To: <dev...@li...> > Sent: Wednesday, October 04, 2000 10:39 AM > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > > > > The sleep function should count seconds. That is the standard. > > The delay function is used to wait milli-seconds. > > > > Jonathan > > > > > > > > > > > > "Jay Silverman" <jas...@at...> on 04/10/2000 11:26:53 AM > > > > Please respond to dev...@li... > > > > To: dev...@li... > > cc: (bcc: Jonathan Murray/Edgars/ZA) > > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > > > > > > It doesn't count seconds, it counts milliseconds (?). 1000 = 1 second :) > > > > > > *Jemini* ~Jay~ > > ----- Original Message ----- > > From: <JM...@ed...> > > To: <dev...@li...> > > Sent: Wednesday, October 04, 2000 5:10 AM > > Subject: [Dev-C++] Sleep function not working properly > > > > > > > > > > Hello, > > > > I have just started using Dev-C++ and notice that when I call the sleep > > function > > in my programs, it does not halt execution for the given amount of > seconds. > > I have experimented with very large timeframes (eg. 2000 seconds) and > sleep > > starts to work. But 2000 seconds causes a wait of about 2 seconds. > > I am doing DOS console programs in C and then running them under Windows > 95. > > > > Any ideas? > > > > Thanks > > Jonathan > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > > > > > > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > --- The Dominican Peter Stone lo...@nm... |
From: printf c. <pi...@ho...> - 2000-10-05 00:30:26
|
thankz ----- Original Message ----- From: "Peter Stone" <lo...@nm...> To: <dev...@li...> Sent: Wednesday, October 04, 2000 9:02 PM Subject: Re: [Dev-C++] Sleep function not working properly > a jiffy is 1/100 second, a millisecond is 1/1000 second, so > 1 jiffy = 10 milliseconds. > > On Wed, 4 Oct 2000, printf cout wrote: > > > whats the difference between a milisecond and a jiffie? > > ----- Original Message ----- > > From: <JM...@ed...> > > To: <dev...@li...> > > Sent: Wednesday, October 04, 2000 10:39 AM > > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > > > > > > > > > The sleep function should count seconds. That is the standard. > > > The delay function is used to wait milli-seconds. > > > > > > Jonathan > > > > > > > > > > > > > > > > > > "Jay Silverman" <jas...@at...> on 04/10/2000 11:26:53 AM > > > > > > Please respond to dev...@li... > > > > > > To: dev...@li... > > > cc: (bcc: Jonathan Murray/Edgars/ZA) > > > Subject: Re: [Dev-C++] Sleep function not working properly > > > > > > > > > > > > > > > It doesn't count seconds, it counts milliseconds (?). 1000 = 1 second :) > > > > > > > > > *Jemini* ~Jay~ > > > ----- Original Message ----- > > > From: <JM...@ed...> > > > To: <dev...@li...> > > > Sent: Wednesday, October 04, 2000 5:10 AM > > > Subject: [Dev-C++] Sleep function not working properly > > > > > > > > > > > > > > > Hello, > > > > > > I have just started using Dev-C++ and notice that when I call the sleep > > > function > > > in my programs, it does not halt execution for the given amount of > > seconds. > > > I have experimented with very large timeframes (eg. 2000 seconds) and > > sleep > > > starts to work. But 2000 seconds causes a wait of about 2 seconds. > > > I am doing DOS console programs in C and then running them under Windows > > 95. > > > > > > Any ideas? > > > > > > Thanks > > > Jonathan > > > > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > > > --- > The Dominican > Peter Stone > lo...@nm... > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |