This source file includes following definitions.
- scaleTimeout
package org.chromium.base.test.util;
public class ScalableTimeout {
private static Double sTimeoutScale = null;
private static final String PROPERTY_FILE = "/data/local/tmp/chrome_timeout_scale";
public static long scaleTimeout(long timeout) {
if (sTimeoutScale == null) {
try {
char[] data = TestFileUtil.readUtf8File(PROPERTY_FILE, 32);
sTimeoutScale = Double.parseDouble(new String(data));
} catch (Exception e) {
sTimeoutScale = 1.0;
}
}
return (long)(timeout * sTimeoutScale);
}
}