withTimeout function

Execute an expression with a timeout