Remaining time in a thread....

  • Thread starter Thread starter HyperX
  • Start date Start date
H

HyperX

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.
 
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
 
Back
Top