Add Timeout func.
Merge pull request #1 from pblaszczyk/timeout

Add Timeout func.