Made it possible to give timeout as argument.

.. default to 10 seconds as before.
Merge pull request #11 from Skalar/master

Made it possible to give timeout as argument.