|
Re: Netbeans doesn't like Thread.yield()
Yes, but when a thread sleeps the scheduler moves on to the next task. The greatest resolution you can expect is somewhat greater than a millisecond, more like sixteen (iirc) due to task switching (if it happens) and other threads running.
It's probably true that sleeping for only a few ms is a bit slim... I would suggest something more like 50, if you can spare it. But this is only if he doesn't want to turn off the warning that bugs him.
|