Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: bench/BenchSysTimer_c.cpp

Issue 344213003: Move BenchTimer to tools as Timer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixes Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8 #include "BenchSysTimer_c.h"
9
10 //Time
11 #include <time.h>
12
13 void BenchSysTimer::startWall() {
14 this->fStartWall = time();
15 }
16 void BenchSysTimer::startCpu() {
17 this->fStartCpu = clock();
18 }
19
20 double BenchSysTimer::endCpu() {
21 clock_t end_cpu = clock();
22 this->fCpu = (end_cpu - this->fStartCpu) * CLOCKS_PER_SEC / 1000.0;
23 }
24 double BenchSysTimer::endWall() {
25 time_t end_wall = time();
26 this->fWall = difftime(end_wall, this->fstartWall) / 1000.0;
27 }
OLDNEW
« no previous file with comments | « bench/BenchSysTimer_c.h ('k') | bench/BenchSysTimer_mach.h » ('j') | tools/timer/GpuTimer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698