mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 07:43:36 -10:00
This source set target lets other targets import the test utils without needing to export them. They get built into angle_util. They also get compiled into the various tests and samples. The change also fixes export issues. Moves some of the GN logic into the util/ subfolder. Bug: angleproject:3162 Bug: chromium:1030192 Change-Id: If99d201092ad8541c0de60b3bd893ac9b5875270 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1968259 Reviewed-by: Yuly Novikov <[email protected]> Reviewed-by: Jamie Madill <[email protected]> Commit-Queue: Jamie Madill <[email protected]>
30 lines
681 B
C++
30 lines
681 B
C++
//
|
|
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
//
|
|
|
|
#ifndef SAMPLE_UTIL_TIMER_H
|
|
#define SAMPLE_UTIL_TIMER_H
|
|
|
|
class Timer final
|
|
{
|
|
public:
|
|
Timer();
|
|
~Timer() {}
|
|
|
|
// Use start() and stop() to record the duration and use getElapsedTime() to query that
|
|
// duration. If getElapsedTime() is called in between, it will report the elapsed time since
|
|
// start().
|
|
void start();
|
|
void stop();
|
|
double getElapsedTime() const;
|
|
|
|
private:
|
|
bool mRunning;
|
|
double mStartTime;
|
|
double mStopTime;
|
|
};
|
|
|
|
#endif // SAMPLE_UTIL_TIMER_H
|