Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
dart_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_RUNTIME_DART_TIMESTAMP_PROVIDER_H_
6#define FLUTTER_RUNTIME_DART_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 flutter {
14
16
17/// TimestampProvider implementation that is backed by Dart_TimelineGetTicks
19 public:
24
26
27 fml::TimePoint Now() override;
28
29 private:
30 static constexpr int64_t kNanosPerSecond = 1000000000;
31
32 int64_t ConvertToNanos(int64_t ticks, int64_t frequency);
33
35
37};
38
39} // namespace flutter
40
41#endif // FLUTTER_RUNTIME_DART_TIMESTAMP_PROVIDER_H_
TimestampProvider implementation that is backed by Dart_TimelineGetTicks.
static DartTimestampProvider & Instance()
VkInstance instance
Definition main.cc:48
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
fml::TimePoint DartTimelineTicksSinceEpoch()