Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a90928f

Browse files
committed
fix test
1 parent 64261d5 commit a90928f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fml/time/time_point_unittest.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
#include "flutter/fml/time/dart_timestamp_provider.h"
88

9+
#include <thread>
10+
911
#include "gtest/gtest.h"
1012

1113
namespace fml {
@@ -17,8 +19,11 @@ TEST(TimePoint, Control) {
1719
}
1820

1921
TEST(TimePoint, DartClockIsMonotonic) {
22+
using namespace std::chrono_literals;
2023
const auto t1 = DartTimelineTicksSinceEpoch();
24+
std::this_thread::sleep_for(1us);
2125
const auto t2 = DartTimelineTicksSinceEpoch();
26+
std::this_thread::sleep_for(1us);
2227
const auto t3 = DartTimelineTicksSinceEpoch();
2328
EXPECT_LT(TimePoint::Min(), t1);
2429
EXPECT_LT(t1, t2);

0 commit comments

Comments
 (0)