diff options
| author | Pavel Labath <labath@google.com> | 2016-11-02 10:27:54 +0000 |
|---|---|---|
| committer | Pavel Labath <labath@google.com> | 2016-11-02 10:27:54 +0000 |
| commit | 766fd11597aaf89673da610958cfd54081465bb5 (patch) | |
| tree | ac83a00ae8cd5b1d9974048dbdd7987dd9a0255b /lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | |
| parent | bcba39ab9c8c4d2faeff70774fca91b1efec79e3 (diff) | |
| download | bcm5719-llvm-766fd11597aaf89673da610958cfd54081465bb5.tar.gz bcm5719-llvm-766fd11597aaf89673da610958cfd54081465bb5.zip | |
Remove TimeValue from UnwindLLDB.cpp
Really NFC, as the code is #ifdefed out, but I did make sure it compiles if I enable it.
llvm-svn: 285797
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp index 775920a28c8..6e2a9a9ee10 100644 --- a/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp +++ b/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp @@ -44,7 +44,8 @@ uint32_t UnwindLLDB::DoGetFrameCount() { //#define DEBUG_FRAME_SPEED 1 #if DEBUG_FRAME_SPEED #define FRAME_COUNT 10000 - TimeValue time_value(TimeValue::Now()); + using namespace std::chrono; + auto time_value = steady_clock::now(); #endif if (!AddFirstFrame()) return 0; @@ -55,13 +56,11 @@ uint32_t UnwindLLDB::DoGetFrameCount() { while (AddOneMoreFrame(abi)) { #if DEBUG_FRAME_SPEED if ((m_frames.size() % FRAME_COUNT) == 0) { - TimeValue now(TimeValue::Now()); - uint64_t delta_t = now - time_value; - printf("%u frames in %" PRIu64 ".%09llu ms (%g frames/sec)\n", - FRAME_COUNT, delta_t / TimeValue::NanoSecPerSec, - delta_t % TimeValue::NanoSecPerSec, - (float)FRAME_COUNT / - ((float)delta_t / (float)TimeValue::NanoSecPerSec)); + const auto now = steady_clock::now(); + const auto delta_t = now - time_value; + printf("%u frames in %.9f ms (%g frames/sec)\n", FRAME_COUNT, + duration<double, std::milli>(delta_t).count(), + (float)FRAME_COUNT / duration<double>(delta_t).count()); time_value = now; } #endif |

