2
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
6
// Timer.cpp: Implementation of a high precision timer class.
9
#include "util/Timer.h"
11
#include "common/system_utils.h"
13
Timer::Timer() : mRunning(false), mStartTime(0), mStopTime(0) {}
17
mStartTime = angle::GetCurrentTime();
23
mStopTime = angle::GetCurrentTime();
27
double Timer::getElapsedTime() const
32
endTime = angle::GetCurrentTime();
39
return endTime - mStartTime;