Fix the waiting strategy of interval.

When the interval is really long but the user sets earlier deadline,
time.Sleep() will wait between the API calls longer than expected.

That situation would happen when we will introduce interval per
error code and set long interval for some errors (like 30s for
ResourceExhausted).

Change-Id: I3669e9103a20b1655ea6985cb343e8093e66fc3f
2 files changed
tree: 8fdb05ea01ef48176aa669f1d1003e48a38bfbdc
  1. gax.go
  2. gax_test.go
  3. option.go
  4. option_test.go
  5. README.md
README.md

GAX: Google API eXtension

GAX provides the utilities for gRPC-based API client libraries.