Last active
September 7, 2018 10:47
-
-
Save pamartineza/758cd5bc4826d11729d52d1be6097585 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//retryCount is a Long variable value | |
//eg. When retryCount = 1, observable emmits a 0L after 2 sec, then completes | |
//eg. When retryCount = 2, observable emmits a 0L after 4 sec, then completes | |
//eg. When retryCount = 3, observable emmits a 0L after 8 sec, then completes | |
Observable.timer(Math.pow(2.toDouble(), retryCount.toDouble()).toLong(), TimeUnit.SECONDS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment