Home
last modified time | relevance | path

Searched refs:taskRan (Results 1 – 2 of 2) sorted by relevance

/frameworks/av/media/utils/tests/
DTimerThread-test.cpp52 std::atomic<bool> taskRan = false; in testBasic() local
55 thread.scheduleTask("Basic", [&taskRan](TimerThread::Handle) { in testBasic()
56 taskRan = true; }, DISTRIBUTE_TIMEOUT_SECONDCHANCE_MS_FRAC(100, frac)); in testBasic()
59 ASSERT_FALSE(taskRan); in testBasic()
61 ASSERT_TRUE(taskRan); // timed-out called. in testBasic()
70 std::atomic<bool> taskRan = false; in testCancel() local
73 thread.scheduleTask("Cancel", [&taskRan](TimerThread::Handle) { in testCancel()
74 taskRan = true; }, DISTRIBUTE_TIMEOUT_SECONDCHANCE_MS_FRAC(100, frac)); in testCancel()
77 ASSERT_FALSE(taskRan); in testCancel()
80 ASSERT_FALSE(taskRan); // timed-out did not call. in testCancel()
[all …]
/frameworks/base/services/tests/voiceinteractiontests/src/com/android/server/soundtrigger_middleware/
DUptimeTimerTest.java35 AtomicBoolean taskRan = new AtomicBoolean(false); in testBasic() local
37 timer.createTask(() -> taskRan.set(true), 100); in testBasic()
39 boolean before = taskRan.get(); in testBasic()
41 boolean after = taskRan.get(); in testBasic()
48 AtomicBoolean taskRan = new AtomicBoolean(false); in testCancel() local
50 UptimeTimer.Task task = timer.createTask(() -> taskRan.set(true), 100); in testCancel()
52 boolean before = taskRan.get(); in testCancel()
55 boolean after = taskRan.get(); in testCancel()