Implemented timeout functionality.
Implemented timeout functionality.