diff options
author | 2011-06-07 19:16:02 +0000 | |
---|---|---|
committer | 2011-06-07 19:16:02 +0000 | |
commit | be9ad4e5fc6126a1273a7dccf1a85db72e763df3 (patch) | |
tree | c2cbcb82171d33e7034116891d6f6f70c6448537 /bench/BenchSysTimer_posix.h | |
parent | 41249466fe997f9df3fec3c06e03d56fc48be607 (diff) |
Higher resolution timers for bench.
http://codereview.appspot.com/4548090/
git-svn-id: http://skia.googlecode.com/svn/trunk@1534 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'bench/BenchSysTimer_posix.h')
-rw-r--r-- | bench/BenchSysTimer_posix.h | 19 |
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 + |