dumpstate: allow printf the duration of command to bugreport

Google bring change b86f33be to ignore printting the duration
of command shorter than 500ms to bugreport. However, it is not
convenient for developers to grep|sort the dumpstate sections.

I think the right thing to do is:
(1) Keep the logcat logging the same:
     if (elapsed >= .5f || verbose_) {
         MYLOGD("Duration of '%s': %.2fs\n", title_.c_str(), elapsed);
      }
(2) printf the duration of command if logcat_only_ is false.

Change-Id: I947fdd514eb31b6a6058dd841d15ba41aba063ac
Signed-off-by: chenqiwu <chenqiwu@xiaomi.com>
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index c5bfb42..d705fa8 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -2913,15 +2913,13 @@
 DurationReporter::~DurationReporter() {
     if (!title_.empty()) {
         float elapsed = (float)(Nanotime() - started_) / NANOS_PER_SEC;
-        if (elapsed < .5f && !verbose_) {
-            return;
+        if (elapsed >= .5f || verbose_) {
+            MYLOGD("Duration of '%s': %.2fs\n", title_.c_str(), elapsed);
         }
-        MYLOGD("Duration of '%s': %.2fs\n", title_.c_str(), elapsed);
-        if (logcat_only_) {
-            return;
+        if (!logcat_only_) {
+            // Use "Yoda grammar" to make it easier to grep|sort sections.
+            printf("------ %.3fs was the duration of '%s' ------\n", elapsed, title_.c_str());
         }
-        // Use "Yoda grammar" to make it easier to grep|sort sections.
-        printf("------ %.3fs was the duration of '%s' ------\n", elapsed, title_.c_str());
     }
 }