-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: corepriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
In most code examples given (both in GitHub & official docs) where a sleep is needed, then Thread.sleep(x) is used. For example:
- https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-bigquery
- https://cloud.google.com/bigquery/querying-data
For better readability/clarity, then it may be prudent to consider using the TimeUnit class instead. Yes, it's all the same as it calls Thread.sleep(x) under the hood, but consider the following as an example:
Thread.sleep(180000) vs. TimeUnit.MINUTES.sleep(3)
More info: http://stackoverflow.com/questions/9587673/thread-sleep-vs-timeunit-seconds-sleep
Metadata
Metadata
Assignees
Labels
api: corepriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.