Commit e8e62649 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Apply scaleTimeout to the default timeout in CallbackHelper

If we wanted to support fractional scales well we'd need to switch to
using some smaller unit, such as milliseconds, but that doesn't seem to
be the purpose of scaleTimeout (the example given in the documentation
is scale == 20), and it would require touching many files.

Bug: none
Change-Id: I97b625d10b3be5ddbd305694ab78714a43677f08
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2084717Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746638}
parent 1f76cc49
...@@ -126,7 +126,7 @@ import java.util.concurrent.TimeoutException; ...@@ -126,7 +126,7 @@ import java.util.concurrent.TimeoutException;
*/ */
public class CallbackHelper { public class CallbackHelper {
/** The default timeout (in seconds) for a callback to wait. */ /** The default timeout (in seconds) for a callback to wait. */
public static final long WAIT_TIMEOUT_SECONDS = 5L; public static final long WAIT_TIMEOUT_SECONDS = ScalableTimeout.scaleTimeout(5L);
private final Object mLock = new Object(); private final Object mLock = new Object();
private int mCallCount; private int mCallCount;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment