Source release 17.1.0
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
// Copyright 2017 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
#ifndef WVCDM_METRICS_TIMER_METRIC_H_
|
||||
#define WVCDM_METRICS_TIMER_METRIC_H_
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace wvcdm {
|
||||
namespace metrics {
|
||||
|
||||
class TimerMetric {
|
||||
class Timer {
|
||||
public:
|
||||
// Constructs a new TimerMetric.
|
||||
explicit TimerMetric() : is_started_(false) {}
|
||||
Timer() {}
|
||||
// Starts the clock running. If the clock was previously set, this resets it.
|
||||
// IsStarted will return true after this call.
|
||||
void Start();
|
||||
@@ -24,11 +24,9 @@ class TimerMetric {
|
||||
double AsUs() const;
|
||||
|
||||
private:
|
||||
std::chrono::steady_clock clock_;
|
||||
std::chrono::time_point<std::chrono::steady_clock> start_;
|
||||
bool is_started_;
|
||||
bool is_started_ = false;
|
||||
};
|
||||
|
||||
} // namespace metrics
|
||||
} // namespace wvcdm
|
||||
#endif
|
||||
#endif // WVCDM_METRICS_TIMER_METRIC_H_
|
||||
|
||||
Reference in New Issue
Block a user