What are the Timeouts for?
For TCP the timeout is to set how long the program waits for a reply on each port, if no reply within that time frame then the program declares that port to be closed. For UDP the timeout is to set how long the program waits for a reply on each port, if no reply within that time frame then the program declares that port to be open.