Chromium Code Reviews| Index: tools/android/loading/devtools_monitor.py |
| diff --git a/tools/android/loading/devtools_monitor.py b/tools/android/loading/devtools_monitor.py |
| index cd52dfba7f57d00b6e5cd4fe4a0e6cdb49e906fb..b64e468d5c210c447c8cd7178214f27413e93382 100644 |
| --- a/tools/android/loading/devtools_monitor.py |
| +++ b/tools/android/loading/devtools_monitor.py |
| @@ -235,9 +235,9 @@ class DevToolsConnection(object): |
| Args: |
| url: (str) a URL to navigate to before starting monitoring loop. |
| timeout_seconds: timeout in seconds for monitoring loop. |
| - stop_delay_multiplier: How long to wait after page load completed before |
| - tearing down, relative to the time it took to reach the page load to |
| - complete. |
| + stop_delay_multiplier: (float) How long to wait after page load completed |
| + before tearing down, relative to the time it took to reach the page load |
| + to complete. |
| """ |
| for domain in self._domains_to_enable: |
| self._ws.RegisterDomain(domain, self._OnDataReceived) |
| @@ -271,11 +271,13 @@ class DevToolsConnection(object): |
| elif self._monitoring_stop_timestamp is None: |
| assert self._monitoring_start_timestamp is not None |
| current_time = datetime.datetime.now() |
| - stop_delay_duration = self._stop_delay_multiplier * ( |
| - current_time - self._monitoring_start_timestamp) |
| - logging.info('Delaying monitoring stop for %ds', |
| - stop_delay_duration.total_seconds()) |
| - self._monitoring_stop_timestamp = current_time + stop_delay_duration |
| + stop_delay_duration_seconds = self._stop_delay_multiplier * ( |
| + current_time - self._monitoring_start_timestamp).seconds |
|
pasko
2016/11/14 13:21:27
was it also assuming seconds before or something m
Benoit L
2016/11/14 13:26:19
It was seconds as well, but couldn't handle non-in
|
| + logging.info('Delaying monitoring stop for %.1fs', |
| + stop_delay_duration_seconds) |
| + self._monitoring_stop_timestamp = ( |
| + current_time + datetime.timedelta( |
| + seconds=stop_delay_duration_seconds)) |
| def ExecuteJavaScript(self, expression): |
| """Run JavaScript expression. |