[llvm] r271037 - [Timer] Expose an API to check if the timer is running.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 12:12:26 PDT 2016
Author: davide
Date: Fri May 27 14:12:26 2016
New Revision: 271037
URL: http://llvm.org/viewvc/llvm-project?rev=271037&view=rev
Log:
[Timer] Expose an API to check if the timer is running.
Modified:
llvm/trunk/include/llvm/Support/Timer.h
Modified: llvm/trunk/include/llvm/Support/Timer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Timer.h?rev=271037&r1=271036&r2=271037&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Timer.h (original)
+++ llvm/trunk/include/llvm/Support/Timer.h Fri May 27 14:12:26 2016
@@ -104,6 +104,9 @@ public:
const std::string &getName() const { return Name; }
bool isInitialized() const { return TG != nullptr; }
+ // Check if the timer is currently running.
+ bool isRunning() const { return Running; }
+
/// Check if startTimer() has ever been called on this timer.
bool hasTriggered() const { return Triggered; }
More information about the llvm-commits
mailing list