Please use seconds.
You define the WAIT_TIMEOUT_SECONDS and then convert it to milliseconds.
Please change it.