diff options
author | Pavel Labath <labath@google.com> | 2016-10-19 15:01:22 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-10-19 15:01:22 +0000 |
commit | 37dabc24270ceb55337544c8df904208659a5330 (patch) | |
tree | 852c87189f0bad0685934b19410681d4d8f9c1bc | |
parent | 2adccee13f1df8282295a0382117543c04708c06 (diff) | |
download | bcm5719-llvm-37dabc24270ceb55337544c8df904208659a5330.tar.gz bcm5719-llvm-37dabc24270ceb55337544c8df904208659a5330.zip |
Remove IntervalTimer class
Summary:
it was added back in 2013, but there are no uses of it. I started refactoring
it, but then it occured to me it would better to delete it.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D25393
llvm-svn: 284599
-rw-r--r-- | lldb/include/lldb/Core/Timer.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/lldb/include/lldb/Core/Timer.h b/lldb/include/lldb/Core/Timer.h index cefe52dec23..5a5bd62a29b 100644 --- a/lldb/include/lldb/Core/Timer.h +++ b/lldb/include/lldb/Core/Timer.h @@ -85,47 +85,6 @@ private: DISALLOW_COPY_AND_ASSIGN(Timer); }; -class IntervalTimer { -public: - IntervalTimer() : m_start(TimeValue::Now()) {} - - ~IntervalTimer() = default; - - uint64_t GetElapsedNanoSeconds() const { return TimeValue::Now() - m_start; } - - void Reset() { m_start = TimeValue::Now(); } - - int PrintfElapsed(const char *format, ...) - __attribute__((format(printf, 2, 3))) { - TimeValue now(TimeValue::Now()); - const uint64_t elapsed_nsec = now - m_start; - const char *unit = nullptr; - float elapsed_value; - if (elapsed_nsec < 1000) { - unit = "ns"; - elapsed_value = (float)elapsed_nsec; - } else if (elapsed_nsec < 1000000) { - unit = "us"; - elapsed_value = (float)elapsed_nsec / 1000.0f; - } else if (elapsed_nsec < 1000000000) { - unit = "ms"; - elapsed_value = (float)elapsed_nsec / 1000000.0f; - } else { - unit = "sec"; - elapsed_value = (float)elapsed_nsec / 1000000000.0f; - } - int result = printf("%3.2f %s: ", elapsed_value, unit); - va_list args; - va_start(args, format); - result += vprintf(format, args); - va_end(args); - return result; - } - -protected: - TimeValue m_start; -}; - } // namespace lldb_private #endif // liblldb_Timer_h_ |