Descriptionnanobench: fix and simplify --samplingTime
Recent changes to WallTimer broke --samplingTime. In particular, this idiom became nonsensical:
WallTimer timer;
timer.start();
do {
...
timer.end();
} while(timer.fWall < ...);
WallTimer started making private use of fWall between when start() and end() were called, so the second time around the loop we end up with nonsense.
If that makes no sense, don't worry. The code here using now_ms() is just as fast, just as precise, and clearer.
I took the opportunity to simplify --samplingTime <complicated string parsing> to --ms <int>, and to simplify the code that depends on it.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/bbba16878f343b232d844281fbdf056c00e20fb6
Patch Set 1 #Patch Set 2 : fmt #Messages
Total messages: 11 (5 generated)
|