[PATCH] D15619: [Support] Make llvm::Timer reusable
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 22 08:52:21 PST 2015
rafael added inline comments.
================
Comment at: lib/Support/Timer.cpp:146
@@ -147,1 +145,3 @@
+ assert(Started && "Cannot stop a paused timer");
+ Started = false;
Time += TimeRecord::getCurrentTime(false);
----------------
"Running" might be a better name for Started now.
================
Comment at: lib/Support/Timer.cpp:152
@@ +151,3 @@
+void Timer::clear() {
+ Started = Triggered = false;
+ Time = StartTime = TimeRecord();
----------------
The comment says "This does not affect the result of hasTriggered()."
http://reviews.llvm.org/D15619
More information about the llvm-commits
mailing list