More safe timer

Add possibility to start the timer from within the function call.
Remove double lock release when canceling the timer from within the function call.
See #3