|
-
August 1st, 2002, 04:23 AM
#1
Sleep
Hi Guys,
Would any of you know what the equivalent of:
C++: Sleep( 1000 );
would be in C#?
Thanks,
Jenny
-
August 1st, 2002, 06:00 AM
#2
Re: Sleep
Hello!
Would any of you know what the equivalent of:
C++: Sleep( 1000 );
Try System.Threading.Thread.Sleep(1000);
Best regards,
Thomas Hetzer
-
August 1st, 2002, 06:46 AM
#3
Hi,
Thanks for that...
Does it still do the same job if you arent using threads?
Thanks,
Jenny
-
August 1st, 2002, 06:59 AM
#4
Hello!
Does it still do the same job if you arent using threads?
You are always using threads. Even if you do not start additional threads, your code is executed in the main thread. If you call Thread.Sleep(1000) from your main thread, your main thread will be blocked for one second.
Best regards,
Thomas Hetzer
-
August 2nd, 2002, 03:03 AM
#5
Thanks Thomas!
You have really helped!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|