Add a way to set the thread loop waitTime
Add a random number generator