21ba77273d
The bot logs record and display their own now, and they're slightly nicer (color coded!). Change-Id: I4626f62ed0a12bbd0dd837bcc83d7809e4ae347d Reviewed-on: https://skia-review.googlesource.com/158663 Auto-Submit: Mike Klein <mtklein@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
27 lines
504 B
C++
27 lines
504 B
C++
/*
|
|
* Copyright 2011 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef Timer_DEFINED
|
|
#define Timer_DEFINED
|
|
|
|
#include "SkString.h"
|
|
#include "SkTime.h"
|
|
#include "SkTypes.h"
|
|
|
|
class WallTimer {
|
|
public:
|
|
WallTimer() : fWall(-1) {}
|
|
|
|
void start() { fWall = SkTime::GetNSecs(); }
|
|
void end() { fWall = (SkTime::GetNSecs() - fWall) * 1e-6; }
|
|
|
|
double fWall; // Milliseconds.
|
|
};
|
|
|
|
SkString HumanizeMs(double);
|
|
|
|
#endif
|