Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: tools/telemetry/telemetry/core/util.py

Issue 61483002: Reland: [Telemetry] Fix image_decoding_measurement timeout. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/telemetry/telemetry/core/util.py
diff --git a/tools/telemetry/telemetry/core/util.py b/tools/telemetry/telemetry/core/util.py
index 8d8eefb2e5d157cf811b11bda2994b11ab32b440..525239847a567275f7c86e8ad7672830f4a2cfc2 100644
--- a/tools/telemetry/telemetry/core/util.py
+++ b/tools/telemetry/telemetry/core/util.py
@@ -39,7 +39,7 @@ def AddDirToPythonPath(*path_parts):
sys.path.append(path)
-def WaitFor(condition, timeout, pass_time_left_to_func=False):
+def WaitFor(condition, timeout):
"""Waits for up to |timeout| secs for the function |condition| to return True.
Polling frequency is (elapsed_time / 10), with a min of .1s and max of 5s.
@@ -50,11 +50,7 @@ def WaitFor(condition, timeout, pass_time_left_to_func=False):
start_time = time.time()
while True:
elapsed_time = time.time() - start_time
- if pass_time_left_to_func:
- remaining_time = timeout - elapsed_time
- res = condition(max(remaining_time, 0.0))
- else:
- res = condition()
+ res = condition()
if res:
return res
if elapsed_time > timeout:

Powered by Google App Engine
This is Rietveld 408576698