1 /* 2 * Copyright 2011 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 #ifndef SysTimer_DEFINED 8 #define SysTimer_DEFINED 9 10 #include <mach/mach.h> 11 #include <mach/mach_time.h> 12 13 class SysTimer { 14 public: 15 void startWall(); 16 void startCpu(); 17 double endCpu(); 18 double endWall(); 19 private: 20 time_value_t fStartCpu; 21 uint64_t fStartWall; 22 }; 23 24 #endif 25