Thread: [Dev-C++] sleep() for Windows XP
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jamiil A. <jal...@gm...> - 2007-07-23 16:33:08
|
Using GCC, I developed some small apps under Linux, now I am trying to = port this apps to MSWinXP, but there are some Unix functions that are = not available under MS, sleep() is one of them. Does anyone know where I = can find a source code for such service, so that it is a portable = sleep() function? |
|
From: matheus r. <mfr...@gm...> - 2007-07-23 16:41:56
|
Usually when I am in such a situation I make a wrapper function:
namespace::mysleep(int t)){
#if WIN32
Sleep(t);
#else
sleep(t);
#endif
}
You can also do that through defines to avoid code change.
Im not sure theres a portable version of sleep, dont think its part of
standard libc. I could be wrong though.
> Using GCC, I developed some small apps under Linux, now I am trying to port
> this apps to MSWinXP, but there are some Unix functions that are not
> available under MS, sleep() is one of them. Does anyone know where I can
> find a source code for such service, so that it is a portable sleep()
> function?
|
|
From: Adam J. <aj...@i-...> - 2007-07-24 02:24:30
|
>>You wrote: >> Does anyone know where I can find a source code for such service, so = that it is a portable sleep() function? Why do you feel the need to cause your program to sleep(). There may be other ways of pausing executive without using a platform dependent = command. Or using #defines. If you could provide more details, that may be = helpful. -Adam Jones From: dev...@li... [mailto:dev...@li...] On Behalf Of Jamiil Abduqadir Sent: Monday, July 23, 2007 3:37 PM To: Dev Cpp MailingLinst Subject: [Dev-C++] sleep() for Windows XP Using GCC, I developed some small apps under Linux, now I am trying to = port this apps to MSWinXP, but there are some Unix functions that are not available=A0under MS, sleep() is one of them. Does anyone know where I = can find a source code for such service, so that it is=A0a portable sleep() function? =A0 |
|
From: Adam J. <aj...@i-...> - 2007-07-24 03:18:01
|
Just in case you are interested, here is a platfrom independent way to =
cause
your program to sleep without using sleep() or MS version Sleep(). It =
also
avoids preprocessors commands.
#include <time.h>
Int main()
{
unsigned int clockTicks; //Stores the amount
of time you want to pause execution in clock ticks
clock_t ticksReached; //Stores the amount
of clock ticks
clockTicks =3D 3000; //set pause to 3 seconds
ticksReached =3D clockTicks + clock(); //get number of
clocks tick since program started then add the addition wait time
while (ticksReached > clock()); //loop until current clock
ticks equal the ticks needed to wait
return 0;
}
It is more code, but it is platfrom independent and free of preprocessor
commands.....
-Adam Jones
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Adam =
Jones
Sent: Monday, July 23, 2007 10:24 PM
To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
Subject: Re: [Dev-C++] sleep() for Windows XP
>>You wrote:
>> Does anyone know where I can find a source code for such service, so =
that
it is a portable sleep() function?
Why do you feel the need to cause your program to sleep(). There may be
other ways of pausing executive without using a platform dependent =
command.
Or using #defines. If you could provide more details, that may be =
helpful.
-Adam Jones
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Jamiil
Abduqadir
Sent: Monday, July 23, 2007 3:37 PM
To: Dev Cpp MailingLinst
Subject: [Dev-C++] sleep() for Windows XP
Using GCC, I developed some small apps under Linux, now I am trying to =
port
this apps to MSWinXP, but there are some Unix functions that are not
available=A0under MS, sleep() is one of them. Does anyone know where I =
can
find a source code for such service, so that it is=A0a portable sleep()
function?
=A0
-------------------------------------------------------------------------=
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: matheus r. <mfr...@gm...> - 2007-07-24 04:32:42
|
But it also eats your cpu cycles... Sleep doest consume CPU.
2007/7/23, Adam Jones <aj...@i-...>:
> Just in case you are interested, here is a platfrom independent way to cause
> your program to sleep without using sleep() or MS version Sleep(). It also
> avoids preprocessors commands.
>
> #include <time.h>
>
> Int main()
> {
>
> unsigned int clockTicks; //Stores the amount
> of time you want to pause execution in clock ticks
> clock_t ticksReached; //Stores the amount
> of clock ticks
>
> clockTicks = 3000; //set pause to 3 seconds
> ticksReached = clockTicks + clock(); //get number of
> clocks tick since program started then add the addition wait time
> while (ticksReached > clock()); //loop until current clock
> ticks equal the ticks needed to wait
>
> return 0;
> }
>
> It is more code, but it is platfrom independent and free of preprocessor
> commands.....
>
> -Adam Jones
>
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Adam Jones
> Sent: Monday, July 23, 2007 10:24 PM
> To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> >>You wrote:
> >> Does anyone know where I can find a source code for such service, so that
> it is a portable sleep() function?
>
> Why do you feel the need to cause your program to sleep(). There may be
> other ways of pausing executive without using a platform dependent command.
> Or using #defines. If you could provide more details, that may be helpful.
>
> -Adam Jones
>
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Jamiil
> Abduqadir
> Sent: Monday, July 23, 2007 3:37 PM
> To: Dev Cpp MailingLinst
> Subject: [Dev-C++] sleep() for Windows XP
>
> Using GCC, I developed some small apps under Linux, now I am trying to port
> this apps to MSWinXP, but there are some Unix functions that are not
> availableunder MS, sleep() is one of them. Does anyone know where I can
> find a source code for such service, so that it isa portable sleep()
> function?
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Adam J. <aj...@i-...> - 2007-07-24 15:39:43
|
>> You Wrote:
>>But it also eats your cpu cycles... Sleep doest consume CPU.
Please reserve your comments to information that is accurate. You are giving
the wrong information. I don't know any CPU Instruction that does not
require cpu cycles.
Sleep() is not some magical command, nor a cpu instruction. It is a function
call just like any other function call. It takes a value (DWORD) and returns
VOID. It's prototype declaration is in windows.h.
If you take the time to investigate you will notice the assembler code that
gets produced when you make this call. Better yet you could have just read
the MSDN entry on microsoft's website and it would have told you how this
function works. Functionally it works the same way as the function I wrote.
It checks the clock ticks and compares them to see if the require time has
lapse.
The major difference is that my function is platform independent, and it
does not require preprocessor commands. As you know, windows.h is only
available on a windows platform. The function I wrote, requires only time.h
which is a c++ library.
I will even take this one step further. If you compile these two programs,
the sizes of the files are the same (16k), and the assembler code that is
produced is almost Identical.
Program 1:
//Source code headers
#include <time.h>
//Main program function
int main()
{
//sleep command
unsigned int clockTicks;
clock_t ticksReached;
clockTicks = 3000;
ticksReached = clockTicks + clock();
while (ticksReached > clock());
//Exit program
return 0;
}
Program 2:
//Source code headers
#include <windows.h>
//Main program function
int main()
{
//sleep command
Sleep(300);
//Exit program
return 0;
}
- Adam Jones
-----Original Message-----
From: matheus ribeiro [mailto:mfr...@gm...]
Sent: Tuesday, July 24, 2007 12:32 AM
To: Adam Jones
Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
Subject: Re: [Dev-C++] sleep() for Windows XP
But it also eats your cpu cycles... Sleep doest consume CPU.
2007/7/23, Adam Jones <aj...@i-...>:
> Just in case you are interested, here is a platfrom independent way to
cause
> your program to sleep without using sleep() or MS version Sleep(). It also
> avoids preprocessors commands.
>
> #include <time.h>
>
> Int main()
> {
>
> unsigned int clockTicks; //Stores the
amount
> of time you want to pause execution in clock ticks
> clock_t ticksReached; //Stores the
amount
> of clock ticks
>
> clockTicks = 3000; //set pause to 3 seconds
> ticksReached = clockTicks + clock(); //get number of
> clocks tick since program started then add the addition wait time
> while (ticksReached > clock()); //loop until current clock
> ticks equal the ticks needed to wait
>
> return 0;
> }
>
> It is more code, but it is platfrom independent and free of preprocessor
> commands.....
>
> -Adam Jones
>
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Adam
Jones
> Sent: Monday, July 23, 2007 10:24 PM
> To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> >>You wrote:
> >> Does anyone know where I can find a source code for such service, so
that
> it is a portable sleep() function?
>
> Why do you feel the need to cause your program to sleep(). There may be
> other ways of pausing executive without using a platform dependent
command.
> Or using #defines. If you could provide more details, that may be helpful.
>
> -Adam Jones
>
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Jamiil
> Abduqadir
> Sent: Monday, July 23, 2007 3:37 PM
> To: Dev Cpp MailingLinst
> Subject: [Dev-C++] sleep() for Windows XP
>
> Using GCC, I developed some small apps under Linux, now I am trying to
port
> this apps to MSWinXP, but there are some Unix functions that are not
> availableunder MS, sleep() is one of them. Does anyone know where I can
> find a source code for such service, so that it isa portable sleep()
> function?
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Per W. <pw...@ia...> - 2007-07-24 15:52:03
|
Not really correct. The Sleep() call does not busy-loop. It suspends the
current thread to allow other threads to run for the delay duration.
This is the description for the dwMilliseconds parameter to Sleep().
"Specifies the time, in milliseconds, for which to suspend execution. A
value of zero causes the thread to relinquish the remainder of its time
slice to any other thread of equal priority that is ready to run. If there
are no other threads of equal priority ready to run, the function returns
immediately, and the thread continues execution. A value of INFINITE
causes an infinite delay."
This is easy to test by writing a miniature program with a Sleep(60000) -
the program will terminate after one minute, but during this time the Task
Manager will show that it doesn't consume any processor time.
/pwm
On Tue, 24 Jul 2007, Adam Jones wrote:
> >> You Wrote:
> >>But it also eats your cpu cycles... Sleep doest consume CPU.
>
> Please reserve your comments to information that is accurate. You are giving
> the wrong information. I don't know any CPU Instruction that does not
> require cpu cycles.
> Sleep() is not some magical command, nor a cpu instruction. It is a function
> call just like any other function call. It takes a value (DWORD) and returns
> VOID. It's prototype declaration is in windows.h.
>
> If you take the time to investigate you will notice the assembler code that
> gets produced when you make this call. Better yet you could have just read
> the MSDN entry on microsoft's website and it would have told you how this
> function works. Functionally it works the same way as the function I wrote.
> It checks the clock ticks and compares them to see if the require time has
> lapse.
>
> The major difference is that my function is platform independent, and it
> does not require preprocessor commands. As you know, windows.h is only
> available on a windows platform. The function I wrote, requires only time.h
> which is a c++ library.
>
> I will even take this one step further. If you compile these two programs,
> the sizes of the files are the same (16k), and the assembler code that is
> produced is almost Identical.
>
> Program 1:
> //Source code headers
> #include <time.h>
>
> //Main program function
> int main()
> {
> //sleep command
> unsigned int clockTicks;
> clock_t ticksReached;
>
> clockTicks = 3000;
> ticksReached = clockTicks + clock();
> while (ticksReached > clock());
>
>
> //Exit program
> return 0;
> }
>
> Program 2:
>
> //Source code headers
> #include <windows.h>
>
> //Main program function
> int main()
> {
> //sleep command
> Sleep(300);
>
> //Exit program
> return 0;
> }
>
> - Adam Jones
>
>
>
> -----Original Message-----
> From: matheus ribeiro [mailto:mfr...@gm...]
> Sent: Tuesday, July 24, 2007 12:32 AM
> To: Adam Jones
> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> But it also eats your cpu cycles... Sleep doest consume CPU.
>
> 2007/7/23, Adam Jones <aj...@i-...>:
> > Just in case you are interested, here is a platfrom independent way to
> cause
> > your program to sleep without using sleep() or MS version Sleep(). It also
> > avoids preprocessors commands.
> >
> > #include <time.h>
> >
> > Int main()
> > {
> >
> > unsigned int clockTicks; //Stores the
> amount
> > of time you want to pause execution in clock ticks
> > clock_t ticksReached; //Stores the
> amount
> > of clock ticks
> >
> > clockTicks = 3000; //set pause to 3 seconds
> > ticksReached = clockTicks + clock(); //get number of
> > clocks tick since program started then add the addition wait time
> > while (ticksReached > clock()); //loop until current clock
> > ticks equal the ticks needed to wait
> >
> > return 0;
> > }
> >
> > It is more code, but it is platfrom independent and free of preprocessor
> > commands.....
> >
> > -Adam Jones
> >
> >
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Adam
> Jones
> > Sent: Monday, July 23, 2007 10:24 PM
> > To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
> > Subject: Re: [Dev-C++] sleep() for Windows XP
> >
> > >>You wrote:
> > >> Does anyone know where I can find a source code for such service, so
> that
> > it is a portable sleep() function?
> >
> > Why do you feel the need to cause your program to sleep(). There may be
> > other ways of pausing executive without using a platform dependent
> command.
> > Or using #defines. If you could provide more details, that may be helpful.
> >
> > -Adam Jones
> >
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Jamiil
> > Abduqadir
> > Sent: Monday, July 23, 2007 3:37 PM
> > To: Dev Cpp MailingLinst
> > Subject: [Dev-C++] sleep() for Windows XP
> >
> > Using GCC, I developed some small apps under Linux, now I am trying to
> port
> > this apps to MSWinXP, but there are some Unix functions that are not
> > availableunder MS, sleep() is one of them. Does anyone know where I can
> > find a source code for such service, so that it isa portable sleep()
> > function?
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Adam J. <aj...@i-...> - 2007-07-24 18:30:17
|
You are correct! I went to the documentation myself and I was incorrect. For
that I apologizes for giving incorrect information. The thread is suspend,
and then it is awaken by the operating system.
Sorry for the wrong information.....
-----Original Message-----
From: Per Westermark [mailto:pw...@ia...]
Sent: Tuesday, July 24, 2007 11:52 AM
To: Adam Jones
Cc: 'matheus ribeiro'; 'Dev Cpp MailingLinst'
Subject: Re: [Dev-C++] sleep() for Windows XP
Not really correct. The Sleep() call does not busy-loop. It suspends the
current thread to allow other threads to run for the delay duration.
This is the description for the dwMilliseconds parameter to Sleep().
"Specifies the time, in milliseconds, for which to suspend execution. A
value of zero causes the thread to relinquish the remainder of its time
slice to any other thread of equal priority that is ready to run. If there
are no other threads of equal priority ready to run, the function returns
immediately, and the thread continues execution. A value of INFINITE
causes an infinite delay."
This is easy to test by writing a miniature program with a Sleep(60000) -
the program will terminate after one minute, but during this time the Task
Manager will show that it doesn't consume any processor time.
/pwm
On Tue, 24 Jul 2007, Adam Jones wrote:
> >> You Wrote:
> >>But it also eats your cpu cycles... Sleep doest consume CPU.
>
> Please reserve your comments to information that is accurate. You are
giving
> the wrong information. I don't know any CPU Instruction that does not
> require cpu cycles.
> Sleep() is not some magical command, nor a cpu instruction. It is a
function
> call just like any other function call. It takes a value (DWORD) and
returns
> VOID. It's prototype declaration is in windows.h.
>
> If you take the time to investigate you will notice the assembler code
that
> gets produced when you make this call. Better yet you could have just read
> the MSDN entry on microsoft's website and it would have told you how this
> function works. Functionally it works the same way as the function I
wrote.
> It checks the clock ticks and compares them to see if the require time has
> lapse.
>
> The major difference is that my function is platform independent, and it
> does not require preprocessor commands. As you know, windows.h is only
> available on a windows platform. The function I wrote, requires only
time.h
> which is a c++ library.
>
> I will even take this one step further. If you compile these two programs,
> the sizes of the files are the same (16k), and the assembler code that is
> produced is almost Identical.
>
> Program 1:
> //Source code headers
> #include <time.h>
>
> //Main program function
> int main()
> {
> //sleep command
> unsigned int clockTicks;
> clock_t ticksReached;
>
> clockTicks = 3000;
> ticksReached = clockTicks + clock();
> while (ticksReached > clock());
>
>
> //Exit program
> return 0;
> }
>
> Program 2:
>
> //Source code headers
> #include <windows.h>
>
> //Main program function
> int main()
> {
> //sleep command
> Sleep(300);
>
> //Exit program
> return 0;
> }
>
> - Adam Jones
>
>
>
> -----Original Message-----
> From: matheus ribeiro [mailto:mfr...@gm...]
> Sent: Tuesday, July 24, 2007 12:32 AM
> To: Adam Jones
> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> But it also eats your cpu cycles... Sleep doest consume CPU.
>
> 2007/7/23, Adam Jones <aj...@i-...>:
> > Just in case you are interested, here is a platfrom independent way to
> cause
> > your program to sleep without using sleep() or MS version Sleep(). It
also
> > avoids preprocessors commands.
> >
> > #include <time.h>
> >
> > Int main()
> > {
> >
> > unsigned int clockTicks; //Stores the
> amount
> > of time you want to pause execution in clock ticks
> > clock_t ticksReached; //Stores the
> amount
> > of clock ticks
> >
> > clockTicks = 3000; //set pause to 3 seconds
> > ticksReached = clockTicks + clock(); //get number of
> > clocks tick since program started then add the addition wait time
> > while (ticksReached > clock()); //loop until current
clock
> > ticks equal the ticks needed to wait
> >
> > return 0;
> > }
> >
> > It is more code, but it is platfrom independent and free of preprocessor
> > commands.....
> >
> > -Adam Jones
> >
> >
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Adam
> Jones
> > Sent: Monday, July 23, 2007 10:24 PM
> > To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
> > Subject: Re: [Dev-C++] sleep() for Windows XP
> >
> > >>You wrote:
> > >> Does anyone know where I can find a source code for such service, so
> that
> > it is a portable sleep() function?
> >
> > Why do you feel the need to cause your program to sleep(). There may be
> > other ways of pausing executive without using a platform dependent
> command.
> > Or using #defines. If you could provide more details, that may be
helpful.
> >
> > -Adam Jones
> >
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Jamiil
> > Abduqadir
> > Sent: Monday, July 23, 2007 3:37 PM
> > To: Dev Cpp MailingLinst
> > Subject: [Dev-C++] sleep() for Windows XP
> >
> > Using GCC, I developed some small apps under Linux, now I am trying to
> port
> > this apps to MSWinXP, but there are some Unix functions that are not
> > availableunder MS, sleep() is one of them. Does anyone know where I can
> > find a source code for such service, so that it isa portable sleep()
> > function?
> >
> >
> >
> >
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> >
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: matheus r. <mfr...@gm...> - 2007-07-24 16:17:46
|
My information is not incorrect. Sleep does indeed sleeps, being waked
by an interrupt. Its not a busy wait loop. You can check that by
making your function call and using Sleep call.
Check processor usage and tell us your results.
2007/7/24, Adam Jones <aj...@i-...>:
> >> You Wrote:
> >>But it also eats your cpu cycles... Sleep doest consume CPU.
>
> Please reserve your comments to information that is accurate. You are giving
> the wrong information. I don't know any CPU Instruction that does not
> require cpu cycles.
> Sleep() is not some magical command, nor a cpu instruction. It is a function
> call just like any other function call. It takes a value (DWORD) and returns
> VOID. It's prototype declaration is in windows.h.
>
> If you take the time to investigate you will notice the assembler code that
> gets produced when you make this call. Better yet you could have just read
> the MSDN entry on microsoft's website and it would have told you how this
> function works. Functionally it works the same way as the function I wrote.
> It checks the clock ticks and compares them to see if the require time has
> lapse.
>
> The major difference is that my function is platform independent, and it
> does not require preprocessor commands. As you know, windows.h is only
> available on a windows platform. The function I wrote, requires only time.h
> which is a c++ library.
>
> I will even take this one step further. If you compile these two programs,
> the sizes of the files are the same (16k), and the assembler code that is
> produced is almost Identical.
>
> Program 1:
> //Source code headers
> #include <time.h>
>
> //Main program function
> int main()
> {
> //sleep command
> unsigned int clockTicks;
> clock_t ticksReached;
>
> clockTicks = 3000;
> ticksReached = clockTicks + clock();
> while (ticksReached > clock());
>
>
> //Exit program
> return 0;
> }
>
> Program 2:
>
> //Source code headers
> #include <windows.h>
>
> //Main program function
> int main()
> {
> //sleep command
> Sleep(300);
>
> //Exit program
> return 0;
> }
>
> - Adam Jones
>
>
>
> -----Original Message-----
> From: matheus ribeiro [mailto:mfr...@gm...]
> Sent: Tuesday, July 24, 2007 12:32 AM
> To: Adam Jones
> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> But it also eats your cpu cycles... Sleep doest consume CPU.
>
> 2007/7/23, Adam Jones <aj...@i-...>:
> > Just in case you are interested, here is a platfrom independent way to
> cause
> > your program to sleep without using sleep() or MS version Sleep(). It also
> > avoids preprocessors commands.
> >
> > #include <time.h>
> >
> > Int main()
> > {
> >
> > unsigned int clockTicks; //Stores the
> amount
> > of time you want to pause execution in clock ticks
> > clock_t ticksReached; //Stores the
> amount
> > of clock ticks
> >
> > clockTicks = 3000; //set pause to 3 seconds
> > ticksReached = clockTicks + clock(); //get number of
> > clocks tick since program started then add the addition wait time
> > while (ticksReached > clock()); //loop until current clock
> > ticks equal the ticks needed to wait
> >
> > return 0;
> > }
> >
> > It is more code, but it is platfrom independent and free of preprocessor
> > commands.....
> >
> > -Adam Jones
> >
> >
> > -----Original Message-----
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Adam
> Jones
> > Sent: Monday, July 23, 2007 10:24 PM
> > To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
> > Subject: Re: [Dev-C++] sleep() for Windows XP
> >
> > >>You wrote:
> > >> Does anyone know where I can find a source code for such service, so
> that
> > it is a portable sleep() function?
> >
> > Why do you feel the need to cause your program to sleep(). There may be
> > other ways of pausing executive without using a platform dependent
> command.
> > Or using #defines. If you could provide more details, that may be helpful.
> >
> > -Adam Jones
> >
> > From: dev...@li...
> > [mailto:dev...@li...] On Behalf Of Jamiil
> > Abduqadir
> > Sent: Monday, July 23, 2007 3:37 PM
> > To: Dev Cpp MailingLinst
> > Subject: [Dev-C++] sleep() for Windows XP
> >
> > Using GCC, I developed some small apps under Linux, now I am trying to
> port
> > this apps to MSWinXP, but there are some Unix functions that are not
> > availableunder MS, sleep() is one of them. Does anyone know where I can
> > find a source code for such service, so that it isa portable sleep()
> > function?
> >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
|
|
From: Jamiil A. <jal...@gm...> - 2007-07-24 23:34:55
|
HEY!! Adam, what is wrong with you man?
We appreciate the time and the effort you put into helping others, but your
input sounds more like a threat than a suggestion.
Relaaax man!!
----- Original Message -----
From: "Adam Jones" <aj...@i-...>
To: "'matheus ribeiro'" <mfr...@gm...>
Cc: "'Jamiil Abduqadir'" <jal...@gm...>; "'Dev Cpp MailingLinst'"
<dev...@li...>
Sent: Tuesday, July 24, 2007 8:39 AM
Subject: RE: [Dev-C++] sleep() for Windows XP
>>> You Wrote:
>>>But it also eats your cpu cycles... Sleep doest consume CPU.
>
> Please reserve your comments to information that is accurate. You are
> giving
> the wrong information. I don't know any CPU Instruction that does not
> require cpu cycles.
> Sleep() is not some magical command, nor a cpu instruction. It is a
> function
> call just like any other function call. It takes a value (DWORD) and
> returns
> VOID. It's prototype declaration is in windows.h.
>
> If you take the time to investigate you will notice the assembler code
> that
> gets produced when you make this call. Better yet you could have just read
> the MSDN entry on microsoft's website and it would have told you how this
> function works. Functionally it works the same way as the function I
> wrote.
> It checks the clock ticks and compares them to see if the require time has
> lapse.
>
> The major difference is that my function is platform independent, and it
> does not require preprocessor commands. As you know, windows.h is only
> available on a windows platform. The function I wrote, requires only
> time.h
> which is a c++ library.
>
> I will even take this one step further. If you compile these two programs,
> the sizes of the files are the same (16k), and the assembler code that is
> produced is almost Identical.
>
> Program 1:
> //Source code headers
> #include <time.h>
>
> //Main program function
> int main()
> {
> //sleep command
> unsigned int clockTicks;
> clock_t ticksReached;
>
> clockTicks = 3000;
> ticksReached = clockTicks + clock();
> while (ticksReached > clock());
>
>
> //Exit program
> return 0;
> }
>
> Program 2:
>
> //Source code headers
> #include <windows.h>
>
> //Main program function
> int main()
> {
> //sleep command
> Sleep(300);
>
> //Exit program
> return 0;
> }
>
> - Adam Jones
>
>
>
> -----Original Message-----
> From: matheus ribeiro [mailto:mfr...@gm...]
> Sent: Tuesday, July 24, 2007 12:32 AM
> To: Adam Jones
> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> But it also eats your cpu cycles... Sleep doest consume CPU.
>
> 2007/7/23, Adam Jones <aj...@i-...>:
>> Just in case you are interested, here is a platfrom independent way to
> cause
>> your program to sleep without using sleep() or MS version Sleep(). It
>> also
>> avoids preprocessors commands.
>>
>> #include <time.h>
>>
>> Int main()
>> {
>>
>> unsigned int clockTicks; //Stores the
> amount
>> of time you want to pause execution in clock ticks
>> clock_t ticksReached; //Stores the
> amount
>> of clock ticks
>>
>> clockTicks = 3000; //set pause to 3 seconds
>> ticksReached = clockTicks + clock(); //get number of
>> clocks tick since program started then add the addition wait time
>> while (ticksReached > clock()); //loop until current
>> clock
>> ticks equal the ticks needed to wait
>>
>> return 0;
>> }
>>
>> It is more code, but it is platfrom independent and free of preprocessor
>> commands.....
>>
>> -Adam Jones
>>
>>
>> -----Original Message-----
>> From: dev...@li...
>> [mailto:dev...@li...] On Behalf Of Adam
> Jones
>> Sent: Monday, July 23, 2007 10:24 PM
>> To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
>> Subject: Re: [Dev-C++] sleep() for Windows XP
>>
>> >>You wrote:
>> >> Does anyone know where I can find a source code for such service, so
> that
>> it is a portable sleep() function?
>>
>> Why do you feel the need to cause your program to sleep(). There may be
>> other ways of pausing executive without using a platform dependent
> command.
>> Or using #defines. If you could provide more details, that may be
>> helpful.
>>
>> -Adam Jones
>>
>> From: dev...@li...
>> [mailto:dev...@li...] On Behalf Of Jamiil
>> Abduqadir
>> Sent: Monday, July 23, 2007 3:37 PM
>> To: Dev Cpp MailingLinst
>> Subject: [Dev-C++] sleep() for Windows XP
>>
>> Using GCC, I developed some small apps under Linux, now I am trying to
> port
>> this apps to MSWinXP, but there are some Unix functions that are not
>> availableunder MS, sleep() is one of them. Does anyone know where I can
>> find a source code for such service, so that it isa portable sleep()
>> function?
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Dev-cpp-users mailing list
>> Dev...@li...
>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Dev-cpp-users mailing list
>> Dev...@li...
>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>
|
|
From: Adam J. <aj...@i-...> - 2007-07-25 01:01:54
|
Sorry guys! I was a little too quick! Did not do my homework before
responding. No excuses, but a have a big deadline tomorrow....I will check
myself in the future...
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Jamiil
Abduqadir
Sent: Tuesday, July 24, 2007 10:38 PM
To: 'Dev Cpp MailingLinst'; 'matheus ribeiro'
Subject: Re: [Dev-C++] sleep() for Windows XP
HEY!! Adam, what is wrong with you man?
We appreciate the time and the effort you put into helping others, but your
input sounds more like a threat than a suggestion.
Relaaax man!!
----- Original Message -----
From: "Adam Jones" <aj...@i-...>
To: "'matheus ribeiro'" <mfr...@gm...>
Cc: "'Jamiil Abduqadir'" <jal...@gm...>; "'Dev Cpp MailingLinst'"
<dev...@li...>
Sent: Tuesday, July 24, 2007 8:39 AM
Subject: RE: [Dev-C++] sleep() for Windows XP
>>> You Wrote:
>>>But it also eats your cpu cycles... Sleep doest consume CPU.
>
> Please reserve your comments to information that is accurate. You are
> giving
> the wrong information. I don't know any CPU Instruction that does not
> require cpu cycles.
> Sleep() is not some magical command, nor a cpu instruction. It is a
> function
> call just like any other function call. It takes a value (DWORD) and
> returns
> VOID. It's prototype declaration is in windows.h.
>
> If you take the time to investigate you will notice the assembler code
> that
> gets produced when you make this call. Better yet you could have just read
> the MSDN entry on microsoft's website and it would have told you how this
> function works. Functionally it works the same way as the function I
> wrote.
> It checks the clock ticks and compares them to see if the require time has
> lapse.
>
> The major difference is that my function is platform independent, and it
> does not require preprocessor commands. As you know, windows.h is only
> available on a windows platform. The function I wrote, requires only
> time.h
> which is a c++ library.
>
> I will even take this one step further. If you compile these two programs,
> the sizes of the files are the same (16k), and the assembler code that is
> produced is almost Identical.
>
> Program 1:
> //Source code headers
> #include <time.h>
>
> //Main program function
> int main()
> {
> //sleep command
> unsigned int clockTicks;
> clock_t ticksReached;
>
> clockTicks = 3000;
> ticksReached = clockTicks + clock();
> while (ticksReached > clock());
>
>
> //Exit program
> return 0;
> }
>
> Program 2:
>
> //Source code headers
> #include <windows.h>
>
> //Main program function
> int main()
> {
> //sleep command
> Sleep(300);
>
> //Exit program
> return 0;
> }
>
> - Adam Jones
>
>
>
> -----Original Message-----
> From: matheus ribeiro [mailto:mfr...@gm...]
> Sent: Tuesday, July 24, 2007 12:32 AM
> To: Adam Jones
> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> But it also eats your cpu cycles... Sleep doest consume CPU.
>
> 2007/7/23, Adam Jones <aj...@i-...>:
>> Just in case you are interested, here is a platfrom independent way to
> cause
>> your program to sleep without using sleep() or MS version Sleep(). It
>> also
>> avoids preprocessors commands.
>>
>> #include <time.h>
>>
>> Int main()
>> {
>>
>> unsigned int clockTicks; //Stores the
> amount
>> of time you want to pause execution in clock ticks
>> clock_t ticksReached; //Stores the
> amount
>> of clock ticks
>>
>> clockTicks = 3000; //set pause to 3 seconds
>> ticksReached = clockTicks + clock(); //get number of
>> clocks tick since program started then add the addition wait time
>> while (ticksReached > clock()); //loop until current
>> clock
>> ticks equal the ticks needed to wait
>>
>> return 0;
>> }
>>
>> It is more code, but it is platfrom independent and free of preprocessor
>> commands.....
>>
>> -Adam Jones
>>
>>
>> -----Original Message-----
>> From: dev...@li...
>> [mailto:dev...@li...] On Behalf Of Adam
> Jones
>> Sent: Monday, July 23, 2007 10:24 PM
>> To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
>> Subject: Re: [Dev-C++] sleep() for Windows XP
>>
>> >>You wrote:
>> >> Does anyone know where I can find a source code for such service, so
> that
>> it is a portable sleep() function?
>>
>> Why do you feel the need to cause your program to sleep(). There may be
>> other ways of pausing executive without using a platform dependent
> command.
>> Or using #defines. If you could provide more details, that may be
>> helpful.
>>
>> -Adam Jones
>>
>> From: dev...@li...
>> [mailto:dev...@li...] On Behalf Of Jamiil
>> Abduqadir
>> Sent: Monday, July 23, 2007 3:37 PM
>> To: Dev Cpp MailingLinst
>> Subject: [Dev-C++] sleep() for Windows XP
>>
>> Using GCC, I developed some small apps under Linux, now I am trying to
> port
>> this apps to MSWinXP, but there are some Unix functions that are not
>> availableunder MS, sleep() is one of them. Does anyone know where I can
>> find a source code for such service, so that it isa portable sleep()
>> function?
>>
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Dev-cpp-users mailing list
>> Dev...@li...
>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems? Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>> _______________________________________________
>> Dev-cpp-users mailing list
>> Dev...@li...
>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Jamiil A. <jal...@gm...> - 2007-07-25 12:46:59
|
It's OK Adam, you a are good guy and we all appreciate you impute and the
tremendous help you provide to the C++/Dev-Cpp community.
I wish you the BEST Adam!
----- Original Message -----
From: "Adam Jones" <aj...@i-...>
To: "'Jamiil Abduqadir'" <jal...@gm...>; "'Dev Cpp MailingLinst'"
<dev...@li...>; "'matheus ribeiro'"
<mfr...@gm...>
Sent: Tuesday, July 24, 2007 6:01 PM
Subject: RE: [Dev-C++] sleep() for Windows XP
> Sorry guys! I was a little too quick! Did not do my homework before
> responding. No excuses, but a have a big deadline tomorrow....I will check
> myself in the future...
>
> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...] On Behalf Of Jamiil
> Abduqadir
> Sent: Tuesday, July 24, 2007 10:38 PM
> To: 'Dev Cpp MailingLinst'; 'matheus ribeiro'
> Subject: Re: [Dev-C++] sleep() for Windows XP
>
> HEY!! Adam, what is wrong with you man?
> We appreciate the time and the effort you put into helping others, but
> your
> input sounds more like a threat than a suggestion.
> Relaaax man!!
> ----- Original Message -----
> From: "Adam Jones" <aj...@i-...>
> To: "'matheus ribeiro'" <mfr...@gm...>
> Cc: "'Jamiil Abduqadir'" <jal...@gm...>; "'Dev Cpp MailingLinst'"
> <dev...@li...>
> Sent: Tuesday, July 24, 2007 8:39 AM
> Subject: RE: [Dev-C++] sleep() for Windows XP
>
>
>>>> You Wrote:
>>>>But it also eats your cpu cycles... Sleep doest consume CPU.
>>
>> Please reserve your comments to information that is accurate. You are
>> giving
>> the wrong information. I don't know any CPU Instruction that does not
>> require cpu cycles.
>> Sleep() is not some magical command, nor a cpu instruction. It is a
>> function
>> call just like any other function call. It takes a value (DWORD) and
>> returns
>> VOID. It's prototype declaration is in windows.h.
>>
>> If you take the time to investigate you will notice the assembler code
>> that
>> gets produced when you make this call. Better yet you could have just
>> read
>> the MSDN entry on microsoft's website and it would have told you how this
>> function works. Functionally it works the same way as the function I
>> wrote.
>> It checks the clock ticks and compares them to see if the require time
>> has
>> lapse.
>>
>> The major difference is that my function is platform independent, and it
>> does not require preprocessor commands. As you know, windows.h is only
>> available on a windows platform. The function I wrote, requires only
>> time.h
>> which is a c++ library.
>>
>> I will even take this one step further. If you compile these two
>> programs,
>> the sizes of the files are the same (16k), and the assembler code that is
>> produced is almost Identical.
>>
>> Program 1:
>> //Source code headers
>> #include <time.h>
>>
>> //Main program function
>> int main()
>> {
>> //sleep command
>> unsigned int clockTicks;
>> clock_t ticksReached;
>>
>> clockTicks = 3000;
>> ticksReached = clockTicks + clock();
>> while (ticksReached > clock());
>>
>>
>> //Exit program
>> return 0;
>> }
>>
>> Program 2:
>>
>> //Source code headers
>> #include <windows.h>
>>
>> //Main program function
>> int main()
>> {
>> //sleep command
>> Sleep(300);
>>
>> //Exit program
>> return 0;
>> }
>>
>> - Adam Jones
>>
>>
>>
>> -----Original Message-----
>> From: matheus ribeiro [mailto:mfr...@gm...]
>> Sent: Tuesday, July 24, 2007 12:32 AM
>> To: Adam Jones
>> Cc: Jamiil Abduqadir; Dev Cpp MailingLinst
>> Subject: Re: [Dev-C++] sleep() for Windows XP
>>
>> But it also eats your cpu cycles... Sleep doest consume CPU.
>>
>> 2007/7/23, Adam Jones <aj...@i-...>:
>>> Just in case you are interested, here is a platfrom independent way to
>> cause
>>> your program to sleep without using sleep() or MS version Sleep(). It
>>> also
>>> avoids preprocessors commands.
>>>
>>> #include <time.h>
>>>
>>> Int main()
>>> {
>>>
>>> unsigned int clockTicks; //Stores the
>> amount
>>> of time you want to pause execution in clock ticks
>>> clock_t ticksReached; //Stores the
>> amount
>>> of clock ticks
>>>
>>> clockTicks = 3000; //set pause to 3 seconds
>>> ticksReached = clockTicks + clock(); //get number of
>>> clocks tick since program started then add the addition wait time
>>> while (ticksReached > clock()); //loop until current
>>> clock
>>> ticks equal the ticks needed to wait
>>>
>>> return 0;
>>> }
>>>
>>> It is more code, but it is platfrom independent and free of preprocessor
>>> commands.....
>>>
>>> -Adam Jones
>>>
>>>
>>> -----Original Message-----
>>> From: dev...@li...
>>> [mailto:dev...@li...] On Behalf Of Adam
>> Jones
>>> Sent: Monday, July 23, 2007 10:24 PM
>>> To: 'Jamiil Abduqadir'; 'Dev Cpp MailingLinst'
>>> Subject: Re: [Dev-C++] sleep() for Windows XP
>>>
>>> >>You wrote:
>>> >> Does anyone know where I can find a source code for such service, so
>> that
>>> it is a portable sleep() function?
>>>
>>> Why do you feel the need to cause your program to sleep(). There may be
>>> other ways of pausing executive without using a platform dependent
>> command.
>>> Or using #defines. If you could provide more details, that may be
>>> helpful.
>>>
>>> -Adam Jones
>>>
>>> From: dev...@li...
>>> [mailto:dev...@li...] On Behalf Of Jamiil
>>> Abduqadir
>>> Sent: Monday, July 23, 2007 3:37 PM
>>> To: Dev Cpp MailingLinst
>>> Subject: [Dev-C++] sleep() for Windows XP
>>>
>>> Using GCC, I developed some small apps under Linux, now I am trying to
>> port
>>> this apps to MSWinXP, but there are some Unix functions that are not
>>> availableunder MS, sleep() is one of them. Does anyone know where I can
>>> find a source code for such service, so that it isa portable sleep()
>>> function?
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems? Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>> _______________________________________________
>>> Dev-cpp-users mailing list
>>> Dev...@li...
>>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc.
>>> Still grepping through log files to find problems? Stop.
>>> Now Search log events and configuration files using AJAX and a browser.
>>> Download your FREE copy of Splunk now >> http://get.splunk.com/
>>> _______________________________________________
>>> Dev-cpp-users mailing list
>>> Dev...@li...
>>> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>>> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>>>
>>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|