Shaka Packager SDK
Loading...
Searching...
No Matches
test_clock.h
1// Copyright 2023 Google LLC. All rights reserved.
2//
3// Use of this source code is governed by a BSD-style
4// license that can be found in the LICENSE file or at
5// https://developers.google.com/open-source/licenses/bsd
6
7#ifndef SHAKA_PACKAGER_TEST_CLOCK_H
8#define SHAKA_PACKAGER_TEST_CLOCK_H
9
10#include <string>
11
12#include <packager/utils/clock.h>
13
14namespace shaka {
15
16class TestClock : public Clock {
17 public:
18 explicit TestClock(std::string utc_time_8601);
19 time_point now() noexcept override { return mock_time_; }
20
21 private:
22 time_point mock_time_;
23};
24
25} // namespace shaka
26
27#endif
All the methods that are virtual are virtual for mocking.