Loading cmds/dumpsys/dumpsys.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <algorithm> #include <algorithm> #include <chrono> #include <chrono> #include <iomanip> #include <thread> #include <thread> #include <android-base/file.h> #include <android-base/file.h> Loading Loading @@ -282,7 +283,14 @@ int Dumpsys::main(int argc, char* const argv[]) { std::chrono::duration<double> elapsed_seconds = std::chrono::duration<double> elapsed_seconds = std::chrono::steady_clock::now() - start; std::chrono::steady_clock::now() - start; aout << StringPrintf("--------- %.3fs ", elapsed_seconds.count()).c_str() 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 { } else { aerr << "Can't find service: " << service_name << endl; aerr << "Can't find service: " << service_name << endl; Loading Loading
cmds/dumpsys/dumpsys.cpp +9 −1 Original line number Original line Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <algorithm> #include <algorithm> #include <chrono> #include <chrono> #include <iomanip> #include <thread> #include <thread> #include <android-base/file.h> #include <android-base/file.h> Loading Loading @@ -282,7 +283,14 @@ int Dumpsys::main(int argc, char* const argv[]) { std::chrono::duration<double> elapsed_seconds = std::chrono::duration<double> elapsed_seconds = std::chrono::steady_clock::now() - start; std::chrono::steady_clock::now() - start; aout << StringPrintf("--------- %.3fs ", elapsed_seconds.count()).c_str() 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 { } else { aerr << "Can't find service: " << service_name << endl; aerr << "Can't find service: " << service_name << endl; Loading