2011-07-28 14:26:00 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-06-07 19:16:02 +00:00
|
|
|
#ifndef SkBenchSysTimer_DEFINED
|
|
|
|
#define SkBenchSysTimer_DEFINED
|
|
|
|
|
|
|
|
//Time
|
|
|
|
#include <time.h>
|
|
|
|
|
2013-03-28 13:43:16 +00:00
|
|
|
// Beware: this timer uses standard (as opposed to high precision) clocks
|
2011-06-07 19:16:02 +00:00
|
|
|
class BenchSysTimer {
|
|
|
|
public:
|
|
|
|
void startWall();
|
|
|
|
void startCpu();
|
|
|
|
double endCpu();
|
|
|
|
double endWall();
|
|
|
|
private:
|
|
|
|
clock_t start_cpu;
|
|
|
|
time_t fStartWall;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|