forked from OSchip/llvm-project
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
This commit is contained in:
parent
bcba39ab9c
commit
766fd11597
|
@ -44,7 +44,8 @@ uint32_t UnwindLLDB::DoGetFrameCount() {
|
||||||
//#define DEBUG_FRAME_SPEED 1
|
//#define DEBUG_FRAME_SPEED 1
|
||||||
#if DEBUG_FRAME_SPEED
|
#if DEBUG_FRAME_SPEED
|
||||||
#define FRAME_COUNT 10000
|
#define FRAME_COUNT 10000
|
||||||
TimeValue time_value(TimeValue::Now());
|
using namespace std::chrono;
|
||||||
|
auto time_value = steady_clock::now();
|
||||||
#endif
|
#endif
|
||||||
if (!AddFirstFrame())
|
if (!AddFirstFrame())
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -55,13 +56,11 @@ uint32_t UnwindLLDB::DoGetFrameCount() {
|
||||||
while (AddOneMoreFrame(abi)) {
|
while (AddOneMoreFrame(abi)) {
|
||||||
#if DEBUG_FRAME_SPEED
|
#if DEBUG_FRAME_SPEED
|
||||||
if ((m_frames.size() % FRAME_COUNT) == 0) {
|
if ((m_frames.size() % FRAME_COUNT) == 0) {
|
||||||
TimeValue now(TimeValue::Now());
|
const auto now = steady_clock::now();
|
||||||
uint64_t delta_t = now - time_value;
|
const auto delta_t = now - time_value;
|
||||||
printf("%u frames in %" PRIu64 ".%09llu ms (%g frames/sec)\n",
|
printf("%u frames in %.9f ms (%g frames/sec)\n", FRAME_COUNT,
|
||||||
FRAME_COUNT, delta_t / TimeValue::NanoSecPerSec,
|
duration<double, std::milli>(delta_t).count(),
|
||||||
delta_t % TimeValue::NanoSecPerSec,
|
(float)FRAME_COUNT / duration<double>(delta_t).count());
|
||||||
(float)FRAME_COUNT /
|
|
||||||
((float)delta_t / (float)TimeValue::NanoSecPerSec));
|
|
||||||
time_value = now;
|
time_value = now;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue