blob: 3ed364571ef4e690c4aded7d13c105b96b6f7999 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright 2018 The Chromium 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 SERVICES_AUDIO_SERVICE_METRICS_H_
#define SERVICES_AUDIO_SERVICE_METRICS_H_
#include "base/time/time.h"
namespace base {
class TickClock;
}
namespace audio {
class ServiceMetrics {
public:
explicit ServiceMetrics(const base::TickClock* clock);
~ServiceMetrics();
void HasConnections();
void HasNoConnections();
private:
void LogHasNoConnectionsDuration();
const base::TickClock* clock_;
base::TimeTicks has_connections_start_;
base::TimeTicks has_no_connections_start_;
DISALLOW_COPY_AND_ASSIGN(ServiceMetrics);
};
} // namespace audio
#endif // SERVICES_AUDIO_SERVICE_METRICS_H_
|