blob: dbd57d3b7403e727fcd587e726df38f019dd6c19 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef QUICHE_QUIC_TEST_TOOLS_MOCK_CLOCK_H_
6#define QUICHE_QUIC_TEST_TOOLS_MOCK_CLOCK_H_
7
8#include "net/third_party/quiche/src/quic/core/quic_time.h"
9#include "net/third_party/quiche/src/quic/platform/api/quic_clock.h"
10
11namespace quic {
12
13class MockClock : public QuicClock {
14 public:
15 MockClock();
16 MockClock(const MockClock&) = delete;
17 MockClock& operator=(const MockClock&) = delete;
18 ~MockClock() override;
19
20 // QuicClock implementation:
21 QuicTime Now() const override;
22 QuicTime ApproximateNow() const override;
23 QuicWallTime WallNow() const override;
24
25 // Advances the current time by |delta|, which may be negative.
26 void AdvanceTime(QuicTime::Delta delta);
27
28 private:
29 QuicTime now_;
30};
31
32} // namespace quic
33
34#endif // QUICHE_QUIC_TEST_TOOLS_MOCK_CLOCK_H_