How do you sleep on a thread?

How do you sleep on a thread?

The Sleep() function is part of the Thread class. In Thread Class, there are two overloaded versions of the Sleep() function, one with one parameter and the other with two arguments. The sleep() function is used to pause the execution of the current thread (or any other threads that may be running in the system) for a certain amount of time, after which the thread that was running earlier resumes execution.