Unified Timeout used in openPort function for Windows and Linux.