artiya4u / google-http-java-client

Automatically exported from code.google.com/p/google-http-java-client
0 stars 0 forks source link

ExponentialBackOffPolicy is broken #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version of google-http-java-client (e.g. 1.5.0-beta)?

http://javadoc.google-http-java-client.googlecode.com/hg/1.10.0-beta/com/google/
api/client/http/ExponentialBackOffPolicy.html

Java environment (e.g. Java 6, Android 2.3, App Engine)?

All

Describe the problem.

getNextBackOffMillis() almost always returns BackOffPolicy.STOP.  That's 
because getElapsedTimeMillis() is off by a factory of a thousand.  For example, 
after a second of waiting, when I call getElapsedTimeMillis() I get 1000111.

How would you expect it to be fixed?

getElapsedTimeMillis() needs to divide by 1000.

Original issue reported on code.google.com by yan...@google.com on 8 Jun 2012 at 2:15

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/6304056/

Original comment by yan...@google.com on 8 Jun 2012 at 2:32