Add timeout support

All is in the title :kiss: