Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
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
13
namespace
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.
19
class
ChronoTimestampProvider
:
TimestampProvider
{
20
public
:
21
static
ChronoTimestampProvider
&
Instance
() {
22
static
ChronoTimestampProvider
instance
;
23
return
instance
;
24
}
25
26
~ChronoTimestampProvider
()
override
;
27
28
fml::TimePoint
Now
()
override
;
29
30
private
:
31
ChronoTimestampProvider
();
32
33
FML_DISALLOW_COPY_AND_ASSIGN
(
ChronoTimestampProvider
);
34
};
35
36
fml::TimePoint
ChronoTicksSinceEpoch
();
37
38
}
// namespace fml
39
40
#endif
// FLUTTER_FML_TIME_CHRONO_TIMESTAMP_PROVIDER_H_
fml::ChronoTimestampProvider
Definition
chrono_timestamp_provider.h:19
fml::ChronoTimestampProvider::~ChronoTimestampProvider
~ChronoTimestampProvider() override
fml::ChronoTimestampProvider::Now
fml::TimePoint Now() override
Definition
chrono_timestamp_provider.cc:15
fml::ChronoTimestampProvider::Instance
static ChronoTimestampProvider & Instance()
Definition
chrono_timestamp_provider.h:21
fml::TimePoint
Definition
time_point.h:22
fml::TimestampProvider
Definition
timestamp_provider.h:16
instance
VkInstance instance
Definition
main.cc:64
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
fml
Definition
ascii_trie.cc:9
fml::ChronoTicksSinceEpoch
fml::TimePoint ChronoTicksSinceEpoch()
Definition
chrono_timestamp_provider.cc:21
time_point.h
timestamp_provider.h
fml
time
chrono_timestamp_provider.h
Generated on Mon Dec 1 2025 04:54:21 for Flutter Engine Uber Docs by
1.9.8