Use timespan for thread.sleep