add timeout and valueAsResult support
Merge pull request #13 from lipp/add-timeout-and-valueasresult2

add timeout and valueAsResult support