aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/BenchSysTimer_posix.h
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-07 19:16:02 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-07 19:16:02 +0000
commitbe9ad4e5fc6126a1273a7dccf1a85db72e763df3 (patch)
treec2cbcb82171d33e7034116891d6f6f70c6448537 /bench/BenchSysTimer_posix.h
parent41249466fe997f9df3fec3c06e03d56fc48be607 (diff)
Higher resolution timers for bench.
Diffstat (limited to 'bench/BenchSysTimer_posix.h')
-rw-r--r--bench/BenchSysTimer_posix.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/bench/BenchSysTimer_posix.h b/bench/BenchSysTimer_posix.h
new file mode 100644
index 0000000000..09dfb0e142
--- /dev/null
+++ b/bench/BenchSysTimer_posix.h
@@ -0,0 +1,19 @@
+#ifndef SkBenchSysTimer_DEFINED
+#define SkBenchSysTimer_DEFINED
+
+//Time
+#include <time.h>
+
+class BenchSysTimer {
+public:
+ void startWall();
+ void startCpu();
+ double endCpu();
+ double endWall();
+private:
+ timespec fCpu;
+ timespec fWall;
+};
+
+#endif
+