Merging select() and sleep() methods.