Replaced Blocking Sleep with Non-blocking Delay