diff options
| -rw-r--r-- | cmds/dumpsys/dumpsys.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmds/dumpsys/dumpsys.cpp b/cmds/dumpsys/dumpsys.cpp index f0e7200069..fa6f6dfef3 100644 --- a/cmds/dumpsys/dumpsys.cpp +++ b/cmds/dumpsys/dumpsys.cpp @@ -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; |