Home
last modified time | relevance | path

Searched refs:seconds (Results 1 – 25 of 211) sorted by relevance

123456789

/packages/apps/TvSettings/SettingsAPI/java/com/android/tv/settings/library/util/
DStringUtil.java55 int seconds = (int) Math.floor(millis / 1000); in formatElapsedTime() local
58 seconds += 30; in formatElapsedTime()
62 if (seconds >= SECONDS_PER_DAY) { in formatElapsedTime()
63 days = seconds / SECONDS_PER_DAY; in formatElapsedTime()
64 seconds -= days * SECONDS_PER_DAY; in formatElapsedTime()
66 if (seconds >= SECONDS_PER_HOUR) { in formatElapsedTime()
67 hours = seconds / SECONDS_PER_HOUR; in formatElapsedTime()
68 seconds -= hours * SECONDS_PER_HOUR; in formatElapsedTime()
70 if (seconds >= SECONDS_PER_MINUTE) { in formatElapsedTime()
71 minutes = seconds / SECONDS_PER_MINUTE; in formatElapsedTime()
[all …]
/packages/modules/GeoTZ/locationtzprovider/src/test/java/com/android/timezone/location/provider/
DRealLocationListeningAccountantTest.java39 private static final Duration MAX_ACTIVE_LISTENING_BALANCE = seconds(500);
40 private static final Duration MIN_PASSIVE_LISTENING_DURATION = seconds(3);
41 private static final Duration MIN_ACTIVE_LISTENING_DURATION = seconds(5);
42 private static final Duration MAX_ACTIVE_LISTENING_DURATION = seconds(17);
43 private static final Duration LOCATION_KNOWN_AGE_THRESHOLD = seconds(13);
44 private static final Duration LOCATION_NOT_KNOWN_AGE_THRESHOLD = seconds(7);
49 private static final Duration ARBITRARY_LISTENING_DURATION = seconds(5);
65 assertEquals(seconds(0), mAccountant.getActiveListeningBalanceForTests()); in depositActiveListeningAmount_capped()
67 mAccountant.depositActiveListeningAmount(seconds(1)); in depositActiveListeningAmount_capped()
68 assertEquals(seconds(1), mAccountant.getActiveListeningBalanceForTests()); in depositActiveListeningAmount_capped()
[all …]
/packages/modules/Bluetooth/system/gd/
Dmodule_gdx_unittest.cc97 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_handler_protected_method()
106 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_external_function()
115 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main()
125 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_repost()
140 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_recurse()
149 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_external_function()
158 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni()
168 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_repost()
183 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_recurse()
432 ASSERT_EQ(std::future_status::ready, unblock->wait_for(std::chrono::seconds(1))); in GetNewCallbackOnMain()
[all …]
Dmodule_jniloop_unittest.cc81 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_handler_protected_method()
90 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_external_function()
99 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni()
109 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_repost()
119 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_jni_recurse()
Dmodule_mainloop_unittest.cc81 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_handler_protected_method()
90 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_external_function()
99 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main()
108 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_repost()
118 ASSERT_EQ(future.wait_for(std::chrono::seconds(3)), std::future_status::ready); in call_on_main_recurse()
/packages/apps/DeskClock/src/com/android/deskclock/data/
DTimerStringFormatter.kt42 val seconds: Int in formatTimeRemaining() constant
50 seconds = 0 in formatTimeRemaining()
61 seconds = roundedSeconds in formatTimeRemaining()
67 seconds = roundedSeconds in formatTimeRemaining()
74 val secSeq = Utils.getNumberFormattedQuantityString(context, R.plurals.seconds, seconds) in formatTimeRemaining()
78 context.getString(if (minutes > 1 || hours > 1 || seconds > 1) { in formatTimeRemaining()
86 val showSeconds = seconds > 0 && shouldShowSeconds in formatTimeRemaining()
/packages/apps/DeskClock/src/com/android/deskclock/
DTimerTextController.kt40 var seconds = (remainder / DateUtils.SECOND_IN_MILLIS).toInt() in setTimeString() variable
45 seconds++ in setTimeString()
46 if (seconds == 60) { in setTimeString()
47 seconds = 0 in setTimeString()
56 var time = Utils.getTimeString(mTextView.context, hours, minutes, seconds) in setTimeString()
57 if (isNegative && !(hours == 0 && minutes == 0 && seconds == 0)) { in setTimeString()
/packages/modules/Connectivity/thread/framework/java/android/net/thread/
DOperationalDatasetTimestamp.java69 long seconds = instant.getEpochSecond() + ticks / TICKS_UPPER_BOUND; in fromInstant() local
72 return new OperationalDatasetTimestamp(seconds, ticks, true /* isAuthoritativeSource */); in fromInstant()
139 @IntRange(from = 0x0, to = 0xffffffffffffL) long seconds, in OperationalDatasetTimestamp()
143 seconds >= 0 && seconds <= 0xffffffffffffL, in OperationalDatasetTimestamp()
146 seconds); in OperationalDatasetTimestamp()
151 mSeconds = seconds; in OperationalDatasetTimestamp()
/packages/services/Car/cpp/watchdog/server/
Dcarwatchdogd.rc23 # Below intervals are in seconds
28 # Below durations are in seconds
34 # Below intervals are in seconds
39 # Below durations are in seconds
45 # Below intervals are in seconds
50 # Below durations are in seconds
65 # Duration in seconds that a system event's data is cached
/packages/apps/Dialer/java/com/android/dialer/calllogutils/
DCallLogDurations.java34 long seconds = elapsedSeconds - TimeUnit.MINUTES.toSeconds(minutes); in formatDuration() local
46 Long.toString(seconds), in formatDuration()
53 R.string.call_duration_short_format_pattern, Long.toString(seconds), secondsString); in formatDuration()
65 int seconds = (int) elapsedSeconds - minutes * 60; in formatDurationA11y() local
67 String secondsString = res.getQuantityString(R.plurals.a11y_seconds, seconds); in formatDurationA11y()
70 R.string.a11y_call_duration_format, minutes, minutesString, seconds, secondsString); in formatDurationA11y()
/packages/modules/Bluetooth/system/gd/l2cap/classic/internal/
Dfixed_channel_impl_test.cc43 future.wait_for(std::chrono::seconds(1)); in SyncHandler()
65 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
82 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
111 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
141 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
174 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
203 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
221 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
238 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
240 .WillRepeatedly(Return(std::chrono::seconds(5))); in TEST_F()
[all …]
/packages/services/Car/cpp/watchdog/server/sysprop/
DWatchdogProperties.sysprop18 # Interval in seconds between consecutive boot-time performance data collections.
27 # Duration in seconds of timeout when final signal not received during user-switch.
36 # Duration in seconds of data collection after final signal received for system event.
45 # Duration in seconds of data collection for a system wake up event.
63 # Interval in seconds between consecutive periodic performance data collections.
81 # Interval in seconds between consecutive periodic performance data monitoring.
117 # Duration in seconds that a system event's data is cached.
/packages/apps/DeskClock/tests/src/com/android/deskclock/timer/
DTimerSetupViewTest.java267 private void assertHasValue(int hours, int minutes, int seconds) { in assertHasValue() argument
269 hours * HOUR_IN_MILLIS + minutes * MINUTE_IN_MILLIS + seconds * SECOND_IN_MILLIS; in assertHasValue()
270 assertStateEquals(hours, minutes, seconds); in assertHasValue()
275 String.format(Locale.US, "%02dh %02dm %02ds", hours, minutes, seconds); in assertHasValue()
279 assertTrue(TextUtils.equals("Delete " + seconds % 10, deleteView.getContentDescription())); in assertHasValue()
297 private void assertStateEquals(int hours, int minutes, int seconds) { in assertStateEquals() argument
299 seconds % 10, seconds / 10, minutes % 10, minutes / 10, hours % 10, hours / 10 in assertStateEquals()
/packages/modules/Bluetooth/system/gd/hal/
Dhci_hal_fake.h64 std::chrono::milliseconds timeout = std::chrono::seconds(1));
67 std::chrono::milliseconds timeout = std::chrono::seconds(1));
70 std::chrono::milliseconds timeout = std::chrono::seconds(1));
73 std::chrono::milliseconds timeout = std::chrono::seconds(1));
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/handheld/v31/
DDashboardUtils.kt107 R.string.seconds, in getTimeDiffStr()
164 val seconds = Math.max(1, duration / 1000) in calculateTimeDiffAndUnit() constant
166 if (seconds < 60) { in calculateTimeDiffAndUnit()
167 return Pair.create(seconds, SECONDS) in calculateTimeDiffAndUnit()
169 val minutes = seconds / 60 in calculateTimeDiffAndUnit()
/packages/apps/DeskClock/src/com/android/deskclock/timer/
DTimerSetupView.kt180 val seconds = mInput[1] * 10 + mInput[0] in updateTime() constant
188 uidm.getFormattedNumber(seconds, 2)) in updateTime()
194 r.getQuantityString(R.plurals.seconds, seconds, seconds)) in updateTime()
280 val seconds = mInput[1] * 10 + mInput[0] constant
283 return seconds * DateUtils.SECOND_IN_MILLIS +
/packages/modules/AdServices/adservices/tests/unittest/service-core/assets/msmt_interop_tests/
Dexpired_source.json18 // Clamped to one day (86400 seconds).
84 // Rounded to one day (86400 seconds).
107 // Rounded to two days (172800 seconds).
Daggregatable_report_window.json19 // Clamped to one hour (3600 seconds).
63 // Rounded to one day (86400 seconds).
65 // Default to expiry after rounding (86400 seconds).
/packages/services/Car/cpp/evs/manager/1.1/stats/
DStatsCollector.cpp122 using std::chrono::seconds; in handleCollectionEvent()
124 LOG(WARNING) << "Collection interval of " << duration_cast<seconds>(info->interval).count() in handleCollectionEvent()
127 << duration_cast<seconds>(kMinCollectionInterval).count() << " seconds."; in handleCollectionEvent()
316 using std::chrono::seconds; in stopCustomCollection()
317 const intmax_t interval = duration_cast<seconds>(mCustomCollectionInfo.interval).count(); in stopCustomCollection()
414 using std::chrono::seconds; in toString()
415 const intmax_t interval = duration_cast<seconds>(mPeriodicCollectionInfo.interval).count(); in toString()
/packages/services/Car/cpp/evs/apps/demo_app_evs_support_lib/
Devs_app_support_lib.cpp71 std::this_thread::sleep_for(std::chrono::seconds(1)); in analyze()
94 std::this_thread::sleep_for(std::chrono::seconds(10)); in main()
104 std::this_thread::sleep_for(std::chrono::seconds(10)); in main()
/packages/services/Car/cpp/watchdog/server/src/
DWatchdogPerfService.cpp65 const std::chrono::seconds kDefaultSystemEventCollectionInterval = 1s;
66 const std::chrono::seconds kDefaultPeriodicCollectionInterval = 20s;
67 const std::chrono::seconds kDefaultPeriodicMonitorInterval = 5s;
90 Result<std::chrono::seconds> parseSecondsFlag(const char** args, uint32_t numArgs, size_t pos) { in parseSecondsFlag()
98 return std::chrono::seconds(value); in parseSecondsFlag()
180 std::chrono::duration_cast<std::chrono::seconds>(pollingIntervalNs).count(); in toString()
217 std::chrono::seconds(sysprop::systemEventCollectionInterval().value_or( in start()
221 std::chrono::seconds(sysprop::periodicCollectionInterval().value_or( in start()
225 std::chrono::seconds(sysprop::periodicMonitorInterval().value_or( in start()
649 std::chrono::duration_cast<std::chrono::seconds>( in dumpHelpText()
[all …]
DWatchdogPerfService.h60 constexpr std::chrono::seconds kDefaultPostSystemEventDurationSec = 30s;
61 constexpr std::chrono::seconds kDefaultWakeUpEventDurationSec = 30s;
62 constexpr std::chrono::seconds kDefaultUserSwitchTimeoutSec = 30s;
263 std::chrono::seconds(sysprop::postSystemEventDuration().value_or( in WatchdogPerfService()
266 std::chrono::seconds(sysprop::wakeUpEventDuration().value_or( in WatchdogPerfService()
269 std::chrono::seconds(sysprop::userSwitchTimeout().value_or( in WatchdogPerfService()
/packages/apps/Camera2/src/com/android/camera/data/
DMediaDetails.java176 public static String formatDuration(final Context context, long seconds) { in formatDuration() argument
177 long h = seconds / 3600; in formatDuration()
178 long m = (seconds - h * 3600) / 60; in formatDuration()
179 long s = seconds - (h * 3600 + m * 60); in formatDuration()
/packages/apps/DeskClock/src/com/android/deskclock/stopwatch/
DLapsAdapter.kt304 val seconds: Int in formatTime() constant
309 seconds = hundredths in formatTime()
310 minutes = seconds in formatTime()
317 seconds = (remainder / DateUtils.SECOND_IN_MILLIS).toInt() in formatTime()
353 sTimeBuilder.append(UiDataModel.uiDataModel.getFormattedNumber(seconds, 2)) in formatTime()
/packages/modules/Bluetooth/system/blueberry/tests/gd/cert/
Dcert_self_test.py150 … event_stream.assert_event_occurs(lambda data: data.value_ == 1, timeout=timedelta(seconds=1))
155 … event_stream.assert_event_occurs(lambda data: data.value_ == 4, timeout=timedelta(seconds=1))
164 timeout=timedelta(seconds=1),
171 timeout=timedelta(seconds=1),
303 …t(event_stream).emitsNone(lambda data: data.value_ == 4, timeout=timedelta(seconds=0.15)).thenNone(
304 lambda data: data.value_ == 5, timeout=timedelta(seconds=0.15))
308 … assertThat(event_stream).emitsNone(lambda data: data.value_ == 4, timeout=timedelta(seconds=1))
313 … assertThat(event_stream).emitsNone(lambda data: data.value_ == 2, timeout=timedelta(seconds=1))
326 assertThat(event_stream).emitsNone(timeout=timedelta(seconds=1.0))
331 assertThat(event_stream).emitsNone(timeout=timedelta(seconds=1))

123456789