Flutter Engine
The Flutter Engine
chrono_timestamp_provider.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter 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 FLUTTER_FML_TIME_CHRONO_TIMESTAMP_PROVIDER_H_
6#define FLUTTER_FML_TIME_CHRONO_TIMESTAMP_PROVIDER_H_
7
8#include "flutter/fml/time/timestamp_provider.h"
9
10#include "flutter/fml/macros.h"
11#include "flutter/fml/time/time_point.h"
12
13namespace fml {
14
15/// TimestampProvider implementation that is backed by std::chrono::steady_clock
16/// meant to be used only in tests for `fml`. Other components needing the
17/// current time ticks since epoch should instantiate their own time stamp
18/// provider backed by Dart clock.
20 public:
23 return instance;
24 }
25
27
28 fml::TimePoint Now() override;
29
30 private:
32
33 FML_DISALLOW_COPY_AND_ASSIGN(ChronoTimestampProvider);
34};
35
37
38} // namespace fml
39
40#endif // FLUTTER_FML_TIME_CHRONO_TIMESTAMP_PROVIDER_H_
static ChronoTimestampProvider & Instance()
VkInstance instance
Definition: main.cc:48
Definition: ascii_trie.cc:9
fml::TimePoint ChronoTicksSinceEpoch()