If you are using Sleep in a main thread, all window message processing including GUI update will be freeze.
After trying to press button for couple of times while timeout is in effect, user may just call Task Manager and kill process thinking window hung.

If you do it trying to synchronize threads, Sleep is not a good idea; use Event or Mutex or any thread synchronization method.