fix timeout pending reset
add better test and timeout() function decorator
Release 1.0.1