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

Unified Diff: common/py_utils/py_utils/__init__.py

Issue 2453073002: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor (Closed)
Patch Set: [Telemetry] Move from telemetry WaitFor to py_utils WaitFor Created 4 years, 2 months 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
« no previous file with comments | « no previous file | telemetry/telemetry/core/android_action_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/py_utils/py_utils/__init__.py
diff --git a/common/py_utils/py_utils/__init__.py b/common/py_utils/py_utils/__init__.py
index fb662bc4bb8b3473256d499767fe821435f65bd8..3f2631197a7133daaa059b9b098b3cac35a94cd9 100644
--- a/common/py_utils/py_utils/__init__.py
+++ b/common/py_utils/py_utils/__init__.py
@@ -109,6 +109,10 @@ def WaitFor(condition, timeout):
pass
return condition.__name__
+ # Do an initial check to see if its true.
+ res = condition()
+ if res:
+ return res
start_time = time.time()
last_output_time = start_time
elapsed_time = time.time() - start_time
« no previous file with comments | « no previous file | telemetry/telemetry/core/android_action_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698