| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef SkBenchSysTimer_DEFINED | 8 #ifndef SkBenchSysTimer_DEFINED |
| 9 #define SkBenchSysTimer_DEFINED | 9 #define SkBenchSysTimer_DEFINED |
| 10 | 10 |
| 11 //Time | 11 //Time |
| 12 #include <time.h> | 12 #include <time.h> |
| 13 #warning standard clocks | |
| 14 | 13 |
| 14 // Beware: this timer uses standard (as opposed to high precision) clocks |
| 15 class BenchSysTimer { | 15 class BenchSysTimer { |
| 16 public: | 16 public: |
| 17 void startWall(); | 17 void startWall(); |
| 18 void startCpu(); | 18 void startCpu(); |
| 19 double endCpu(); | 19 double endCpu(); |
| 20 double endWall(); | 20 double endWall(); |
| 21 private: | 21 private: |
| 22 clock_t start_cpu; | 22 clock_t start_cpu; |
| 23 time_t fStartWall; | 23 time_t fStartWall; |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 #endif | 26 #endif |
| OLD | NEW |