Comment Comment by raymondh Also, sleep() just delegates the sorting responsibility to a scheduler which likely uses on O(log n) heap algorithm to identify the next scheduled event. parent raymondh 5 years ago