Increase dex2oat timeouts for debug builds

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

Change-Id: I04d98dfd59003b964c1feee6eee31079f9f4a476
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 19b37af..bd39e67 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -688,12 +688,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_;