Flutter Engine
The Flutter Engine
chrono_timestamp_provider.cc
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#include "flutter/fml/time/chrono_timestamp_provider.h"
6
7#include <chrono>
8
9namespace fml {
10
11ChronoTimestampProvider::ChronoTimestampProvider() = default;
12
14
16 const auto chrono_time_point = std::chrono::steady_clock::now();
17 const auto ticks_since_epoch = chrono_time_point.time_since_epoch().count();
18 return fml::TimePoint::FromTicks(ticks_since_epoch);
19}
20
23}
24
25} // namespace fml
static ChronoTimestampProvider & Instance()
static constexpr TimePoint FromTicks(int64_t ticks)
Definition: time_point.h:48
Definition: ascii_trie.cc:9
fml::TimePoint ChronoTicksSinceEpoch()