Make the max wait time configurable uing a &key argument