Home
last modified time | relevance | path

Searched full:timer (Results 1 – 25 of 9750) sorted by relevance

12345678910>>...390

/aosp_15_r20/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimerModel.kt42 import com.android.deskclock.timer.TimerKlaxon
43 import com.android.deskclock.timer.TimerService
46 * All [Timer] data is accessed via this model.
64 /** Update timer notification when locale changes. */
73 /** The listeners to notify when a timer is added, updated or removed. */
76 /** Delegate that builds platform-specific timer notifications. */
81 * ids in this collection. If a timer was already expired when the app was started its id will
94 private var mTimers: MutableList<Timer>? = null
97 private var mExpiredTimers: MutableList<Timer>? = null
100 private var mMissedTimers: MutableList<Timer>? = null
[all …]
DTimerDAO.kt22 * This class encapsulates the transfer of data between [Timer] domain objects and their
26 /** Key to a preference that stores the set of timer ids. */
29 /** Key to a preference that stores the id to assign to the next timer. */
32 /** Prefix for a key to a preference that stores the state of the timer. */
35 /** Prefix for a key to a preference that stores the original timer length at creation. */
38 /** Prefix for a key to a preference that stores the total timer length with additions. */
41 /** Prefix for a key to a preference that stores the last start time of the timer. */
44 /** Prefix for a key to a preference that stores the epoch time when the timer last started. */
50 /** Prefix for a key to a preference that stores the label of the timer. */
53 /** Prefix for a key to a preference that signals the timer should be deleted on first reset. */
[all …]
/aosp_15_r20/frameworks/base/libs/androidfw/tests/
H A DResourceTimer_test.cpp39 ResourceTimer::Timer timer; in TEST() local
40 ASSERT_THAT(timer.count, 0); in TEST()
41 ASSERT_THAT(timer.total, 0); in TEST()
44 timer.record(US(i)); in TEST()
46 ASSERT_THAT(timer.count, 100); in TEST()
47 ASSERT_THAT(timer.total, US((101 * 100)/2)); in TEST()
48 ASSERT_THAT(timer.mintime, US(1)); in TEST()
49 ASSERT_THAT(timer.maxtime, US(100)); in TEST()
50 ASSERT_THAT(timer.pvalues.p50.floor, 0); in TEST()
51 ASSERT_THAT(timer.pvalues.p50.nominal, 0); in TEST()
[all …]
/aosp_15_r20/external/deqp/framework/delibs/deutil/
H A DdeTimer.c21 * \brief Periodic timer.
39 HANDLE timer; member
44 const deTimer *timer = (const deTimer *)lpParameter; in timerCallback() local
47 timer->callback(timer->callbackArg); in timerCallback()
52 deTimer *timer = (deTimer *)deCalloc(sizeof(deTimer)); in deTimer_create() local
54 if (!timer) in deTimer_create()
57 timer->callback = callback; in deTimer_create()
58 timer->callbackArg = arg; in deTimer_create()
59 timer->timer = 0; in deTimer_create()
61 return timer; in deTimer_create()
[all …]
/aosp_15_r20/external/trusty/lk/kernel/
Dtimer.c26 * @brief Kernel timer subsystem
27 * @defgroup timer Timers
29 * The timer subsystem allows functions to be scheduled for later
30 * execution. Each timer object is used to cause one function to
33 * Timer callback functions are called in interrupt context.
42 #include <kernel/timer.h>
45 #include <platform/timer.h>
61 * @brief Initialize a timer object
63 void timer_initialize(timer_t *timer) in timer_initialize() argument
65 *timer = (timer_t)TIMER_INITIAL_VALUE(*timer); in timer_initialize()
[all …]
/aosp_15_r20/external/openthread/tests/unit/
H A Dtest_trickle_timer.cpp110 TrickleTimerTester timer(*instance); in TestTrickleTimerPlainMode() local
118 // Validate that timer picks a random interval between min and max in TestTrickleTimerPlainMode()
122 timer.Start(TrickleTimer::kModePlainTimer, kMinInterval, kMaxInterval, 0); in TestTrickleTimerPlainMode()
124 VerifyOrQuit(timer.IsRunning()); in TestTrickleTimerPlainMode()
125 VerifyOrQuit(timer.GetIntervalMax() == kMaxInterval); in TestTrickleTimerPlainMode()
126 VerifyOrQuit(timer.GetIntervalMin() == kMinInterval); in TestTrickleTimerPlainMode()
128 interval = timer.GetInterval(); in TestTrickleTimerPlainMode()
135 timer.VerifyTimerDidFire(); in TestTrickleTimerPlainMode()
137 // The plain mode trickle timer restarts with a new random in TestTrickleTimerPlainMode()
140 VerifyOrQuit(timer.IsRunning()); in TestTrickleTimerPlainMode()
[all …]
H A Dtest_timer.cpp35 #include "common/timer.hpp"
96 …ub-classes `TimerMilli` and provides a handler and a counter to keep track of number of times timer
108 …static void HandleTimerFired(Timer &aTimer) { static_cast<TestTimer &>(aTimer).HandleTimerFired();… in HandleTimerFired()
123 uint32_t mFiredCounter; //< Number of times timer has been fired so far
135 * Test the TimerScheduler's behavior of one timer started and fired.
142 TestTimer<TimerType> timer(*instance); in TestOneTimer() local
144 // Test one Timer basic operation. in TestOneTimer()
152 timer.Start(kTimerInterval); in TestOneTimer()
158 VerifyOrQuit(timer.IsRunning(), "Timer running Failed."); in TestOneTimer()
159 VerifyOrQuit(sTimerOn, "Platform Timer State Failed."); in TestOneTimer()
[all …]
/aosp_15_r20/external/cronet/base/timer/
H A Dtimer_unittest.cc5 #include "base/timer/timer.h"
33 // The main thread types on which each timer should be tested.
54 // that |timer| would be fired in that test if it wasn't for the deletion.
61 OneShotTimer timer; in RunTest_OneShotTimers() local
62 timer.Start(FROM_HERE, kTestDelay, in RunTest_OneShotTimers()
67 EXPECT_FALSE(timer.IsRunning()); in RunTest_OneShotTimers()
76 auto timer = std::make_unique<OneShotTimer>(); in RunTest_OneShotTimers_Cancel() local
77 auto* timer_ptr = timer.get(); in RunTest_OneShotTimers_Cancel()
79 // This should run before the timer expires. in RunTest_OneShotTimers_Cancel()
81 std::move(timer)); in RunTest_OneShotTimers_Cancel()
[all …]
/aosp_15_r20/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DTimerTest.java29 import java.util.Timer;
68 * Timer is not cancelled.
79 // Should we terminate the timer at a specific timerCounter?
82 // The timer we belong to
83 Timer timer = null; field in TimerTest.TimerTestTask
88 public TimerTestTask(Timer t) { in TimerTestTask()
89 timer = t; in TimerTestTask()
99 if (terminateCount == timerCounter && timer != null) { in run()
100 timer.cancel(); in run()
138 * java.util.Timer#Timer(boolean)
[all …]
/aosp_15_r20/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/
H A DBatteryStatsDurationTimerTest.java41 final BatteryStatsImpl.DurationTimer timer = new BatteryStatsImpl.DurationTimer(clocks, in testStartStop() local
44 // TimeBase running, timer not running: current and max are 0 in testStartStop()
46 assertFalse(timer.isRunningLocked()); in testStartStop()
47 assertEquals(0, timer.getCurrentDurationMsLocked(300)); in testStartStop()
48 assertEquals(0, timer.getMaxDurationMsLocked(301)); in testStartStop()
49 assertEquals(0, timer.getTotalDurationMsLocked(301)); in testStartStop()
51 // Start timer: current, total, and max advance in testStartStop()
52 timer.startRunningLocked(700); in testStartStop()
53 assertTrue(timer.isRunningLocked()); in testStartStop()
54 assertEquals(800, timer.getCurrentDurationMsLocked(1500)); in testStartStop()
[all …]
/aosp_15_r20/external/libchrome/base/timer/
H A Dtimer_unittest.cc5 #include "base/timer/timer.h"
36 // The message loops on which each timer should be tested.
57 // A basic helper class that can start a one-shot timer and signal a
58 // WaitableEvent when this timer fires.
98 // until the timer fires and to change task runner for the timer.
225 // This should run before the timer expires. in RunTest_OneShotTimers_Cancel()
228 // Now start the timer. in RunTest_OneShotTimers_Cancel()
264 // This should run before the timer expires. in RunTest_RepeatingTimer_Cancel()
267 // Now start the timer. in RunTest_RepeatingTimer_Cancel()
296 // If Delay is never called, the timer shouldn't go off. in RunTest_DelayTimer_NoCall()
[all …]
/aosp_15_r20/prebuilts/go/linux-x86/src/runtime/
Dtime.go16 // A timer is a potentially repeating trigger for calling t.f(t.arg, t.seq).
20 // A timer is expected to be used by only one client goroutine at a time,
21 // but there will be concurrent access by the P managing that timer.
22 // Timer accesses are protected by the lock t.mu, with a snapshot of
24 // decisions about a timer without acquiring the lock.
25 type timer struct { struct
31 isChan bool // timer has a channel; immutable; can be read without lock argument
34 // channel timer and stopping or resetting the timer.
46 // a timer that is reset concurrently with unlockAndRun.
47 // If the reset timer runs immediately, we can wind up with
[all …]
/aosp_15_r20/packages/modules/StatsD/statsd/tests/condition/
DConditionTimer_test.cpp40 ConditionTimer timer(false, time_base); in TEST() local
41 EXPECT_EQ(false, timer.mCondition); in TEST()
42 EXPECT_EQ(0, timer.mTimerNs); in TEST()
44 assertConditionDurationInfo(timer.newBucketStart(ct_start_time, ct_start_time), in TEST()
46 EXPECT_EQ(0, timer.mTimerNs); in TEST()
48 timer.onConditionChanged(true, ct_start_time + 5); in TEST()
49 EXPECT_EQ(ct_start_time + 5, timer.mLastConditionChangeTimestampNs); in TEST()
50 EXPECT_EQ(true, timer.mCondition); in TEST()
52 assertConditionDurationInfo(timer.newBucketStart(ct_start_time + 100, ct_start_time + 100), in TEST()
54 EXPECT_EQ(ct_start_time + 100, timer.mLastConditionChangeTimestampNs); in TEST()
[all …]
/aosp_15_r20/frameworks/rs/toolkit/test/
H A DAllTests.kt89 fun testAll(timer: TimingTracker): String { in <lambda>()
105 val success = test(timer) in <lambda>()
114 private fun testBlend(timer: TimingTracker): Boolean { in <lambda>()
116 testOneBitmapBlend(timer, testImage1, testImage2, mode, null) and in <lambda>()
118 timer, testImage1, testImage2, mode, in <lambda>()
122 testOneRandomBlend(timer, sizeX, sizeY, mode, restriction) in <lambda>()
129 timer: TimingTracker, in <lambda>()
142 timer.measure("IntrinsicBlend") { in <lambda>()
148 timer.measure("ToolkitBlend") { in <lambda>()
153 timer.measure("ReferenceBlend") { in <lambda>()
[all …]
/aosp_15_r20/external/renderscript-intrinsics-replacement-toolkit/test-app/src/main/java/com/google/android/renderscript_test/
H A DAllTests.kt100 fun testOne(intrinsic: Intrinsic, timer: TimingTracker) = in testOne()
111 }.let { test -> test(timer) } in testOne()
114 private fun testBlend(timer: TimingTracker): Boolean { in testBlend()
116 testOneBitmapBlend(timer, testImage1, testImage2, mode, null) and in testBlend()
118 timer, testImage1, testImage2, mode, in testBlend()
122 testOneRandomBlend(timer, sizeX, sizeY, mode, restriction) in testBlend()
129 timer: TimingTracker, in testOneRandomBlend()
142 timer.measure("IntrinsicBlend") { in testOneRandomBlend()
148 timer.measure("ToolkitBlend") { in testOneRandomBlend()
153 timer.measure("ReferenceBlend") { in testOneRandomBlend()
[all …]
/aosp_15_r20/system/chre/core/include/chre/core/
H A Dtimer_pool.h36 * The type to use when referring to a timer instance.
38 * Note that this mirrors the CHRE API definition of a timer handle, so should
49 * Sets up the timer instance initial conditions.
54 * Requests a timer for a nanoapp given a cookie to pass to the nanoapp when
55 * the timer event is published.
57 * @param nanoapp The nanoapp for which this timer is being requested.
58 * @param duration The duration of the timer.
59 * @param cookie A cookie to pass to the app when the timer elapses.
60 * @param isOneShot false if the timer is expected to auto-reload.
61 * @return TimerHandle of the requested timer. Returns CHRE_TIMER_INVALID if
[all …]
/aosp_15_r20/frameworks/base/services/core/java/com/android/server/utils/
H A DAnrTimer.java50 * mode, the timer just sends a delayed message. In modern mode, the timer is implemented in
53 * <p>There are five external operations on a timer:
56 * <li>{@link #start} starts a timer. The timer is started with an object that the message
57 * argument. The timer is also given the pid and uid of the target. A timer that is started must
60 * <li>{@link #cancel} stops a timer and removes any in-flight expiration messages.
62 * <li>{@link #accept} acknowledges that the timer has expired, and that an ANR should be
63 * generated. This clears bookkeeping information for the timer.
65 * <li>{@link #discard} acknowledges that the timer has expired but, for other reasons, no ANR
66 * will be generated. This clears bookkeeping information for the timer.
70 * <p>There is one internal operation on a timer: {@link #expire}. A timer may have automatic
[all …]
/aosp_15_r20/external/grpc-grpc/src/core/lib/iomgr/
H A Dtimer_generic.cc42 #include "src/core/lib/iomgr/timer.h"
51 grpc_core::TraceFlag grpc_timer_trace(false, "timer");
54 // A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with
59 // The 'queue_deadline_cap' gets recomputed periodically based on the timer
68 // The deadline of the next timer due in this shard.
80 // Array of timer shards. Whenever a timer (grpc_timer *) is added, its address
81 // is hashed to select the timer shard to add the timer to
84 // Maintains a sorted list of timer shards (sorted by their min_deadline, i.e
85 // the deadline of the next timer in each shard).
91 // == DEBUG ONLY: hash table for duplicate timer detection ==
[all …]
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/src/core/lib/iomgr/
Dtimer_generic.cc42 #include "src/core/lib/iomgr/timer.h"
51 grpc_core::TraceFlag grpc_timer_trace(false, "timer");
54 // A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with
59 // The 'queue_deadline_cap' gets recomputed periodically based on the timer
68 // The deadline of the next timer due in this shard.
80 // Array of timer shards. Whenever a timer (grpc_timer *) is added, its address
81 // is hashed to select the timer shard to add the timer to
84 // Maintains a sorted list of timer shards (sorted by their min_deadline, i.e
85 // the deadline of the next timer in each shard).
91 // == DEBUG ONLY: hash table for duplicate timer detection ==
[all …]
/aosp_15_r20/external/openthread/src/core/common/
H A Dtimer.hpp31 * This file includes definitions for the multiplexed timer service.
55 * @addtogroup core-timer
58 * This module includes definitions for the multiplexed timer service.
129 * Implements a timer.
132 class Timer : public InstanceLocator, public LinkedListEntry<Timer> class
134 friend class LinkedListEntry<Timer>;
138 * This constant defines maximum delay allowed when starting a timer.
144 * Defines a function reference which is invoked when the timer expires.
146 * @param[in] aTimer A reference to the expired timer instance.
149 typedef void (&Handler)(Timer &aTimer);
[all …]
/aosp_15_r20/external/sdv/vsomeip/third_party/boost/asio/include/boost/asio/
Dbasic_deadline_timer.hpp39 /// Provides waitable timer functionality.
42 * blocking or asynchronous wait for a timer to expire.
44 * A deadline timer is always in one of two states: "expired" or "not expired".
45 * If the wait() or async_wait() function is called on an expired timer, the
57 * // Construct a timer without setting an expiry time.
58 * boost::asio::deadline_timer timer(my_context);
61 * timer.expires_from_now(boost::posix_time::seconds(5));
63 * // Wait for the timer to expire.
64 * timer.wait();
74 * // Timer expired.
[all …]
Dbasic_waitable_timer.hpp50 /// Provides waitable timer functionality.
53 * blocking or asynchronous wait for a timer to expire.
55 * A waitable timer is always in one of two states: "expired" or "not expired".
56 * If the wait() or async_wait() function is called on an expired timer, the
62 * @note This waitable timer functionality is for use with the C++11 standard
72 * // Construct a timer without setting an expiry time.
73 * boost::asio::steady_timer timer(my_context);
76 * timer.expires_after(std::chrono::seconds(5));
78 * // Wait for the timer to expire.
79 * timer.wait();
[all …]
/aosp_15_r20/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/
DTimerFragmentTest.java17 package com.android.deskclock.timer;
37 import com.android.deskclock.data.Timer;
146 final List<Timer> timers = new ArrayList<>(DataModel.getDataModel().getTimers()); in clearTimers()
147 for (Timer timer : timers) { in clearTimers()
148 DataModel.getDataModel().removeTimer(timer); in clearTimers()
185 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsTimer()
187 assertStateEquals(Timer.State.RUNNING, 0); in timeClick_startsTimer()
197 assertStateEquals(Timer.State.RESET, 1); in timeClick_startsSecondTimer()
198 assertStateEquals(Timer.State.RESET, 0); in timeClick_startsSecondTimer()
200 assertStateEquals(Timer.State.RUNNING, 1); in timeClick_startsSecondTimer()
[all …]
/aosp_15_r20/bionic/libc/bionic/
H A Dposix_timers.cpp54 // end up with one of our POSIX timer threads handling it (meaning that the intended recipient
55 // doesn't). glibc uses SIGRTMIN for its POSIX timer implementation, so in the absence of any
64 // The fields below are only needed for a SIGEV_THREAD timer.
69 atomic_bool deleted; // Set when the timer is deleted, to prevent further calling of callback.
72 static __kernel_timer_t to_kernel_timer_id(timer_t timer) { in to_kernel_timer_id() argument
73 return reinterpret_cast<PosixTimer*>(timer)->kernel_timer_id; in to_kernel_timer_id()
77 PosixTimer* timer = reinterpret_cast<PosixTimer*>(arg); in __timer_thread_start() local
79 // Check that our parent managed to create the kernel timer and bail if not... in __timer_thread_start()
80 timer->startup_handshake_lock.lock(); in __timer_thread_start()
81 if (timer->kernel_timer_id == -1) { in __timer_thread_start()
[all …]
/aosp_15_r20/external/coreboot/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/Protocol/
H A DTimer.h2 Timer Architectural Protocol as defined in PI Specification VOLUME 2 DXE
4 This code is used to provide the timer tick for the DXE core.
21 /// Global ID for the Timer Architectural Protocol
27 /// Declare forward reference for the Timer Architectural Protocol
32 This function of this type is called when a timer interrupt fires. This
34 of this type to be called for the timer interrupt, so it can know how much
35 time has passed. This information is used to signal timer based events.
37 @param Time Time since the last timer interrupt in 100 ns units. This will
38 typically be TimerPeriod, but if a timer interrupt is missed, and the
53 the timer interrupt fires. It also passes the amount of time since the last
[all …]

12345678910>>...390