optionally allow Proc for interval

This allows for exponential backoff. Inspired by justeat/retryable.