By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Remaining time in a thread....

P: n/a
Hi,

I'm using

Thread.Sleep(50000);

and I want to display to the user when the current thread will become
active, how do I do that in c#?

Regards,

HyperX.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
and I want to display to the user when the current thread will become
active, how do I do that in c#?


If you're putting the UI thread to sleep, it can't do anything. That
includes displaying things to the user. It's generally a bad idea to
sleep a UI thread, since the app appears to be hung to the user.

Plus, there's no way to really know when the sleeping thread will run
again, the scheduler decides that. The thread will sleep at least
50000 msec, but it could be more.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.