Index: bench/BenchTimer.cpp |
diff --git a/bench/BenchTimer.cpp b/bench/BenchTimer.cpp |
index 3617f9de58b243253499f65df6bf340153a6d8da..f3e8e3b0ec69483f3d298bf3772eb668cd421988 100644 |
--- a/bench/BenchTimer.cpp |
+++ b/bench/BenchTimer.cpp |
@@ -76,3 +76,19 @@ void BenchTimer::truncatedEnd() { |
fTruncatedCpu = fTruncatedSysTimer->endCpu() * fDurationScale; |
fTruncatedWall = fTruncatedSysTimer->endWall() * fDurationScale; |
} |
+ |
+WallTimer::WallTimer() : fWall(-1.0), fSysTimer(new BenchSysTimer) {} |
+ |
+WallTimer::~WallTimer() { |
+ delete fSysTimer; |
+} |
+ |
+void WallTimer::start(double durationScale) { |
+ fDurationScale = durationScale; |
+ fSysTimer->startWall(); |
+} |
+ |
+void WallTimer::end() { |
+ fWall = fSysTimer->endWall() * fDurationScale; |
+} |
+ |