3 * Copyright 2011 Google Inc.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
8 #include "BenchSysTimer_c.h"
13 void BenchSysTimer::startWall() {
14 this->fStartWall = time();
16 void BenchSysTimer::startCpu() {
17 this->fStartCpu = clock();
20 double BenchSysTimer::endCpu() {
21 clock_t end_cpu = clock();
22 this->fCpu = (end_cpu - this->fStartCpu) * CLOCKS_PER_SEC / 1000.0;
24 double BenchSysTimer::endWall() {
25 time_t end_wall = time();
26 this->fWall = difftime(end_wall, this->fstartWall) / 1000.0;