Increase dex2oat timeouts for debug builds

Should fix the 056-const-string-jumbo test.

(cherry picked from commit 0bff4f375d8013a4a59cf70b3427fb461a17e6de)

Change-Id: I38d03fa7f981f0c067c52782e57938bbcbabef17
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index aef235b..0e7da55 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -697,12 +697,18 @@
   }
 
   // When setting timeouts, keep in mind that the build server may not be as fast as your desktop.
+  // Debug builds are slower so they have larger timeouts.
+  static const unsigned int kSlowdownFactor = kIsDebugBuild ? 5U : 1U;
 #if ART_USE_PORTABLE_COMPILER
-  static const unsigned int kWatchDogWarningSeconds =  2 * 60;  // 2 minutes.
-  static const unsigned int kWatchDogTimeoutSeconds = 30 * 60;  // 25 minutes + buffer.
+  // 2 minutes scaled by kSlowdownFactor.
+  static const unsigned int kWatchDogWarningSeconds = kSlowdownFactor * 2 * 60;
+  // 30 minutes scaled by kSlowdownFactor.
+  static const unsigned int kWatchDogTimeoutSeconds = kSlowdownFactor * 30 * 60;
 #else
-  static const unsigned int kWatchDogWarningSeconds =  1 * 60;  // 1 minute.
-  static const unsigned int kWatchDogTimeoutSeconds =  6 * 60;  // 5 minutes + buffer.
+  // 1 minutes scaled by kSlowdownFactor.
+  static const unsigned int kWatchDogWarningSeconds = kSlowdownFactor * 1 * 60;
+  // 6 minutes scaled by kSlowdownFactor.
+  static const unsigned int kWatchDogTimeoutSeconds = kSlowdownFactor * 6 * 60;
 #endif
 
   bool is_watch_dog_enabled_;