Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eadd69b8 authored by Kevin Rocard's avatar Kevin Rocard Committed by android-build-merger
Browse files

Merge "Add dumpsys finish timestamp" into oc-mr1-dev am: 3b11ed3f

am: 628f0c2a

Change-Id: I78659e8722061253bf9f12f06b2a743b28b02706
parents 17107461 628f0c2a
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

#include <algorithm>
#include <chrono>
#include <iomanip>
#include <thread>

#include <android-base/file.h>
@@ -282,7 +283,14 @@ int Dumpsys::main(int argc, char* const argv[]) {
              std::chrono::duration<double> elapsed_seconds =
                  std::chrono::steady_clock::now() - start;
              aout << StringPrintf("--------- %.3fs ", elapsed_seconds.count()).c_str()
                   << "was the duration of dumpsys " << service_name << endl;
                   << "was the duration of dumpsys " << service_name;

              using std::chrono::system_clock;
              const auto finish = system_clock::to_time_t(system_clock::now());
              std::tm finish_tm;
              localtime_r(&finish, &finish_tm);
              aout << ", ending at: " << std::put_time(&finish_tm, "%Y-%m-%d %H:%M:%S")
                   << endl;
            }
        } else {
            aerr << "Can't find service: " << service_name << endl;