There are several ways, depending on the required precision and the sleep time, especially for short wait under 1 milliseconds. A complete study is on https://www.javacodegeeks.com/2015/11/lets-pause-for-a-microsecond.html