


Two overloaded versions of sleep are provided: one that specifies the sleep time to the millisecond and one that specifies the sleep time to the nanosecond. The sleep method can also be used for pacing, as shown in the example that follows, and waiting for another thread with duties that are understood to have time requirements, as with the SimpleThreads example in a later section. This is an efficient means of making processor time available to the other threads of an application or other applications that might be running on a computer system. Thread.sleep causes the current thread to suspend execution for a specified period.
