473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Sleep in .net

Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain
Oct 13 '06 #1
4 7749
Sleep(millisecond) !!

Nothing stops you from using this under C++/CLI.

For strictly managed code, check out Thread::Sleep().
Brian

"--== Alain ==--" <no****@noemail.comwrote in message
news:uz**************@TK2MSFTNGP02.phx.gbl...
Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain

Oct 13 '06 #2
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...

Brian Muth wrote:
Sleep(millisecond) !!

Nothing stops you from using this under C++/CLI.

For strictly managed code, check out Thread::Sleep().
Brian

"--== Alain ==--" <no****@noemail.comwrote in message
news:uz**************@TK2MSFTNGP02.phx.gbl...
>Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain

Oct 14 '06 #3
Try ::Sleep()

Brian

"--== Alain ==--" <no****@noemail.comwrote in message
news:eX**************@TK2MSFTNGP05.phx.gbl...
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...

Brian Muth wrote:
>Sleep(millisecond) !!

Nothing stops you from using this under C++/CLI.

For strictly managed code, check out Thread::Sleep().
Brian

"--== Alain ==--" <no****@noemail.comwrote in message
news:uz**************@TK2MSFTNGP02.phx.gbl...
>>Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain
Oct 14 '06 #4
Hi Alain,

"--== Alain ==--" <no****@noemail.comwrote in message
news:eX**************@TK2MSFTNGP05.phx.gbl...
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...
If you have ambigious types try to remove using statements and use the full
qualified types in your code.

So instead of:

using A::B::C;
D d; // D lives in the above namespace and in some other visible namespace
as well

use:

A::B::C::D d;

--
SvenC
>

Brian Muth wrote:
>Sleep(millisecond) !!

Nothing stops you from using this under C++/CLI.

For strictly managed code, check out Thread::Sleep().
Brian

"--== Alain ==--" <no****@noemail.comwrote in message
news:uz**************@TK2MSFTNGP02.phx.gbl...
>>Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain
Oct 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Anks | last post by:
hi I am displaying a digital clock in an applet.I am using Thread.sleep (1000) for counting every second.This works fine some times but some times my clock just slows down or give an...
7
by: Colin Brown | last post by:
Python 2.3.3 Under Windows NT: Negative Int or Real -> sleeps for a long time Under Linux: Returns IOError: Invalid argument I consider both of these unfriendly results and expected the...
5
by: Dave | last post by:
For the life of me, I thought there was a sleep() function in the Standard Library (or something similarly named), but I can't find it. Is it non-existent or, if not, what header is it in? ...
21
by: Alo Sarv | last post by:
Hi From what I have understood from various posts in this newsgroup, writing event loops pretty much comes down to this: while (true) { handleEvents(); sleep(1); // or _sleep() or...
8
by: Cider123 | last post by:
I ran into a situation where my Window Service had to process 100,000+ files, when I first noticed I needed to tweak various routines. Everything runs fine, but here's what I ran into: In the...
9
by: Chris Dunaway | last post by:
According to the docs, calling Thread.Sleep(0) causes the thread to be "suspended to allow other waiting threads to execute." What happens if I call Thread.Sleep(500)? Do other threads not get a...
17
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. ...
1
by: Matt Brown - identify | last post by:
Hello, I, as well as suspecting many others, am having an issue when I attempt to enter sleep mode in Vista. If any program is connected to the internet (AOL Instant Messenger for instance),...
13
by: Charles Zhang | last post by:
Sleep() function Sleep at lease 1 millisecond, there is a way to make a thread to sleep less than a millisecond? One way I know of is using performance counter which is not really sleep ( loop and...
0
by: Tim Golden | last post by:
Lowell Alleman wrote: Well you've certainly picked a ticklish area to run into problems with ;). First, forget about the threading aspects for the moment. AFAICT the smallest program which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.