Allow setting custom delay function and read/write retries