Hi,
under visual C++ exists a function Sleep(milliseco nd).
What is the equivalent under Visual C++.Net ?
thx,
Alain 4 7772
Sleep(milliseco nd) !!
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******** ******@TK2MSFTN GP02.phx.gbl...
Hi,
under visual C++ exists a function Sleep(milliseco nd).
What is the equivalent under Visual C++.Net ?
thx,
Alain
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(milliseco nd) !!
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******** ******@TK2MSFTN GP02.phx.gbl...
>Hi,
under visual C++ exists a function Sleep(milliseco nd). What is the equivalent under Visual C++.Net ?
thx,
Alain
Try ::Sleep()
Brian
"--== Alain ==--" <no****@noemail .comwrote in message
news:eX******** ******@TK2MSFTN GP05.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(millisec ond) !!
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******* *******@TK2MSFT NGP02.phx.gbl.. .
>>Hi,
under visual C++ exists a function Sleep(milliseco nd). What is the equivalent under Visual C++.Net ?
thx,
Alain
Hi Alain,
"--== Alain ==--" <no****@noemail .comwrote in message
news:eX******** ******@TK2MSFTN GP05.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(millisec ond) !!
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******* *******@TK2MSFT NGP02.phx.gbl.. .
>>Hi,
under visual C++ exists a function Sleep(milliseco nd). What is the equivalent under Visual C++.Net ?
thx,
Alain
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 interrupted exception .I am not
calling Thread.interrupt anywhere in my program. why is it happening?
how to fix the problem?
Anks
|
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 preferable
silent time.sleep(0) in much the same way that slicing a string beyond the
ends returns an empty string.
Colin Brown
PyNZ
|
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?
Thanks!
Dave
|
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 nanosleep(), depending on platform
}
|
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 routine that loops through the file buffer:
for (int i=0;i < _Buffer.length; i++)
{
// Code here
| |
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
chance to execute during this time? What is the difference between the
two?
I have code that runs in a loop like this:
Dim dResetTime As DateTime = DateTime.Now
|
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.
Note, the Windows task manager shows 2 CPUs on the Performance tab with
hyper-threading is turned on.
Both Python 2.3.5 and 2.4.3 (downloaded from python.org) have this
problem.
The operating system is MS Windows XP Professional.
|
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), and I go to enter Sleep mode; Vista will automatically
leave Sleep mode immediately.
I believe this is caused by the fact that Sleep attempts to disconnect
AIM, then AIM attempts to reconnect; thrwarting Vista's attempt to
|
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 check again and
again and uses CPU time).
Thanks
Charles Zhang
|
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 reproduces your problem is:
<code>
import signal
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |