mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Remove Timer::FireNow.
PiperOrigin-RevId: 811123106
This commit is contained in:
committed by
Copybara-Service
parent
eb3ae063f5
commit
72088b7fe2
@@ -55,24 +55,6 @@ TEST(TimerTest, TestRepeatTimer) {
|
||||
EXPECT_TRUE(timer->Stop());
|
||||
}
|
||||
|
||||
TEST(TimerTest, TestFireNow) {
|
||||
int count = 0;
|
||||
absl::Notification notification;
|
||||
|
||||
auto timer = nearby::api::ImplementationPlatform::CreateTimer();
|
||||
|
||||
EXPECT_TRUE(timer != nullptr);
|
||||
EXPECT_TRUE(timer->Create(3000, 3000, [&count, ¬ification]() {
|
||||
++count;
|
||||
notification.Notify();
|
||||
}));
|
||||
EXPECT_TRUE(timer->FireNow());
|
||||
EXPECT_TRUE(timer->Stop());
|
||||
EXPECT_TRUE(
|
||||
notification.WaitForNotificationWithTimeout(absl::Milliseconds(1000)));
|
||||
EXPECT_EQ(count, 1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace windows
|
||||
} // namespace nearby
|
||||
|
||||
Reference in New Issue
Block a user