Display the timeout value of `dex2oat`'s watchdog in milliseconds.
The value of this timeout is internally represented in milliseconds
and is set as a duration in milliseconds with `dex2oat`'s option
`--watchdog-timeout`. However, it used to be reported in seconds in
error messages, which would misrepresents small values; change error
reporting to display this value in seconds for clarity.
Test: atest art_standalone_dex2oat_tests
Bug: 200251675
Change-Id: I7f83e923fafc0b35e3efdd6ec71eb8bb9c460c69
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 0090d58..e24ce0a 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -390,8 +390,8 @@
if (rc == EINTR) {
continue;
} else if (rc == ETIMEDOUT) {
- Fatal(StringPrintf("dex2oat did not finish after %" PRId64 " seconds",
- timeout_in_milliseconds_/1000));
+ Fatal(StringPrintf("dex2oat did not finish after %" PRId64 " milliseconds",
+ timeout_in_milliseconds_));
} else if (rc != 0) {
std::string message(StringPrintf("pthread_cond_timedwait failed: %s", strerror(rc)));
Fatal(message);