2014-06-20 17:43:07 +00:00
|
|
|
|
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.
|
|
|
|
*/
|
2014-06-20 17:43:07 +00:00
|
|
|
#ifndef SkBenchSysTimer_DEFINED
|
|
|
|
#define SkBenchSysTimer_DEFINED
|
2011-06-07 19:16:02 +00:00
|
|
|
|
2014-06-20 17:43:07 +00:00
|
|
|
//Time
|
2011-06-07 19:16:02 +00:00
|
|
|
#include <mach/mach.h>
|
|
|
|
#include <mach/mach_time.h>
|
|
|
|
|
2014-06-20 17:43:07 +00:00
|
|
|
class BenchSysTimer {
|
2011-06-07 19:16:02 +00:00
|
|
|
public:
|
|
|
|
void startWall();
|
|
|
|
void startCpu();
|
|
|
|
double endCpu();
|
|
|
|
double endWall();
|
|
|
|
private:
|
|
|
|
time_value_t fStartCpu;
|
|
|
|
uint64_t fStartWall;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|