/libcore/ojluni/src/test/java/time/tck/java/time/ |
TCKInstant.java | 85 import java.time.Instant; 114 * Test Instant. 119 private static final long MIN_SECOND = Instant.MIN.getEpochSecond(); 120 private static final long MAX_SECOND = Instant.MAX.getEpochSecond(); 127 private static Instant TEST_12345_123456789; 131 TEST_12345_123456789 = Instant.ofEpochSecond(12345, 123456789); 137 TemporalAccessor[] array = {TEST_12345_123456789, Instant.MIN, Instant.MAX, Instant.EPOCH}; 163 private void check(Instant instant, long epochSecs, int nos) [all...] |
TCKClock.java | 65 import java.time.Instant; 88 public Instant instant() { method in class:TCKClock.MockInstantClock 89 return Instant.ofEpochMilli(millis()); 113 private static final Instant INSTANT = Instant.ofEpochSecond(1873687, 357000000); 115 private static final Clock MOCK_INSTANT = new MockInstantClock(INSTANT.toEpochMilli(), ZONE); 120 assertEquals(MOCK_INSTANT.instant(), INSTANT); [all...] |
TCKClock_Tick.java | 67 import java.time.Instant; 89 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000_000).toInstant()); 97 assertEquals(test.instant(), ZDT.withNano((i / 250) * 250_000).toInstant()); 105 assertEquals(test.instant(), ZDT.withNano((i / 20) * 20).toInstant()); 166 assertEquals(test.instant().getNano(), 0); 168 assertEquals(test.instant().getNano(), 0); 180 Instant instant = test.instant(); local 181 assertEquals(instant.getEpochSecond() % 60, 0) [all...] |
TCKClock_Fixed.java | 66 import java.time.Instant; 81 private static final Instant INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant(); 85 Clock test = Clock.fixed(INSTANT, PARIS); 86 assertEquals(test.instant(), INSTANT); 88 assertEquals(test.instant().getEpochSecond()*1000, test.millis()); 98 Clock.fixed(INSTANT, null); 103 Clock test = Clock.fixed(INSTANT, PARIS); 110 Clock test = Clock.fixed(INSTANT, PARIS) [all...] |
TCKClock_Offset.java | 67 import java.time.Instant; 82 private static final Instant INSTANT = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).atZone(ZoneOffset.ofHours(2)).toInstant(); 87 Clock test = Clock.offset(Clock.fixed(INSTANT, PARIS), OFFSET); 88 //System.out.println(test.instant()); 89 //System.out.println(INSTANT.plus(OFFSET)); 90 assertEquals(test.instant(), INSTANT.plus(OFFSET));
|
TCKClock_System.java | 66 import java.time.Instant; 87 Instant instant = system.instant(); local 89 if (systemMillis - instant.toEpochMilli() < 10) { 101 long instant = system.millis(); local 103 if (systemMillis - instant < 10) { 179 assertEquals(a.equals(Clock.fixed(Instant.now(), ZoneOffset.UTC)), false);
|
TCKLocalDate.java | 94 import java.time.Instant; 149 private static Instant MAX_INSTANT; 150 private static Instant MIN_INSTANT; 277 Instant instant = Instant.ofEpochSecond(i); local 278 Clock clock = Clock.fixed(instant, ZoneOffset.UTC); 289 Instant instant = Instant.ofEpochSecond(i) [all...] |
/libcore/luni/src/test/java/libcore/java/time/zone/ |
IcuZoneRulesProviderTest.java | 26 import java.time.Instant; 69 Instant[] instants = new Instant[] { 80 Instant.now() 88 for (Instant instant : instants) { 89 ZoneOffset offset = rules.getOffset(instant); 90 Duration daylightSavings = rules.getDaylightSavings(instant); 91 timeZone.getOffset(instant.toEpochMilli(), false, icuOffsets); 93 assertEquals("total offset for " + zoneId + " at " + instant, 133 Instant instant = start; local [all...] |
/packages/experimental/InstantCookieApp/src/test/instant/cookie/ |
CookieTest.java | 17 package test.instant.cookie; 37 // We should be an instant app 62 // // Set a cookie to later check when reinstalled as instant app 78 // // Make sure we are an instant app 89 // // Make sure we are not an instant app 108 // // The cookie should have been wiped if non-instant app is uninstalled
|
/cts/hostsidetests/appsecurity/test-apps/InstantCookieApp/src/test/instant/cookie/ |
CookieTest.java | 17 package test.instant.cookie; 36 // We should be an instant app 66 // Set a cookie to later check when reinstalled as instant app 82 // Make sure we are an instant app 93 // Make sure we are not an instant app 112 // The cookie should have been wiped if non-instant app is uninstalled
|
/external/webrtc/webrtc/modules/audio_processing/aec/ |
aec_core.h | 43 float instant; member in struct:Stats
|
echo_cancellation.h | 48 int instant; member in struct:__anon37187
|
/libcore/ojluni/src/test/java/time/test/java/util/ |
TestFormatter.java | 27 import java.time.Instant; 108 Instant instant = zdt.toInstant(); local 118 cal.setTimeInMillis(instant.toEpochMilli()); 127 testInstant(locale, instant, zdt, cal); 243 private void testInstant(Locale locale, Instant instant, 248 test(fmtStr, locale, expected, instant);
|
/libcore/luni/src/test/java/libcore/java/util/ |
DateTest.java | 19 import java.time.Instant; 84 * Test that conversion between Date and Instant works when the 85 * Instant is based on a millisecond value (and thus can be 98 assertEquals(new Date(millis), Date.from(Instant.ofEpochMilli(millis))); 99 assertEquals(new Date(millis).toInstant(), Instant.ofEpochMilli(millis)); 103 * Checks the minimum/maximum Instant values (based on seconds and 119 Date.from(Instant.ofEpochSecond(minSecond)); 120 // This instant exactly corresponds to Long.MIN_VALUE msec because 122 Date.from(Instant.ofEpochSecond(minSecond - 1, 192000000)); 123 assertArithmeticOverflowDateFrom(Instant.ofEpochSecond(minSecond - 1, 0)) 166 Instant instant = date.toInstant(); local [all...] |
CalendarTest.java | 19 import java.time.Instant; 170 Instant instant = calendar.toInstant(); local 171 assertEquals(calendar.getTime().toInstant(), instant); local 172 assertEquals(Instant.ofEpochMilli(calendar.getTimeInMillis()), instant); local 174 assertEquals(instant, Instant.parse("2007-12-03T09:15:30Z"));
|
/libcore/ojluni/src/main/java/java/time/ |
Clock.java | 72 * A clock providing access to the current instant, date and time using a time-zone. 74 * Instances of this class are used to find the current instant, which can be 86 * that requires the current instant. A dependency injection framework is one 99 * This approach allows an alternate clock, such as {@link #fixed(Instant, ZoneId) fixed} 116 * as described in {@link Instant}. If the implementation wraps a source that provides leap 137 * Obtains a clock that returns the current instant using the best available 141 * you need the current instant without the date or time. 147 * Conversion from instant to date or time uses the {@linkplain ZoneOffset#UTC UTC time-zone}. 159 * Obtains a clock that returns the current instant using the best available 168 * The {@link #systemUTC() UTC clock} should be used when you need the current instant 410 public abstract Instant instant(); method in class:Clock 470 public Instant instant() { method in class:Clock.SystemClock 497 private final Instant instant; field in class:Clock.FixedClock 520 public Instant instant() { method in class:Clock.FixedClock 570 public Instant instant() { method in class:Clock.OffsetClock 621 public Instant instant() { method in class:Clock.TickClock 626 Instant instant = baseClock.instant(); local [all...] |
OffsetDateTime.java | 106 * {@code OffsetDateTime}, {@link java.time.ZonedDateTime} and {@link java.time.Instant} all store an instant 108 * {@code Instant} is the simplest, simply representing the instant. 109 * {@code OffsetDateTime} adds to the instant the offset from UTC/Greenwich, which allows 113 * It is intended that {@code ZonedDateTime} or {@code Instant} is used to model data 144 * based solely on the instant. 147 * only compares the underlying instant. 161 * The comparison is based on the instant. 240 final Instant now = clock.instant(); // called onc 359 Instant instant = Instant.from(temporal); local [all...] |
/libcore/ojluni/src/main/java/java/time/chrono/ |
Chronology.java | 66 import java.time.Instant; 487 * an {@code Instant}, falling back to a {@code ChronoLocalDateTime} if necessary. 489 * with {@code Instant} or {@code ChronoLocalDateTime}. 506 Instant instant = Instant.from(temporal); local 507 return zonedDateTime(instant, zone); 519 * Obtains a {@code ChronoZonedDateTime} in this chronology from an {@code Instant}. 521 * This obtains a zoned date-time with the same instant as that specified. 523 * @param instant the instant to create the date-time from, not nul [all...] |
/libcore/ojluni/src/test/java/nio/file/attribute/ |
FileTimeTest.java | 35 import java.time.Instant; 53 Instant nowInstant = Instant.ofEpochMilli(now); 83 cmp(Instant.MIN, Long.MIN_VALUE, DAYS, 1); 84 cmp(Instant.MIN, Long.MIN_VALUE, HOURS, 1); 85 cmp(Instant.MIN, Long.MIN_VALUE, MINUTES, 1); 86 cmp(Instant.MIN, Long.MIN_VALUE, SECONDS, 1); 87 cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 1, SECONDS, 1); 88 cmp(Instant.MIN, Instant.MIN.getEpochSecond() - 100, SECONDS, 1) 128 Instant instant = ft.toInstant(); local 137 Instant instant = ft.toInstant(); local 158 Instant instant = Instant.ofEpochSecond(secs, rand.nextInt(1000_000_000)); local [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
TCKInstantPrinterParser.java | 66 import java.time.Instant; 105 {Instant.MAX.getEpochSecond(), 999999999, "+1000000000-12-31T23:59:59.999999999Z"}, 106 {Instant.MIN.getEpochSecond(), 0, "-1000000000-01-01T00:00:00Z"}, 112 Instant instant = Instant.ofEpochSecond(instantSecs, nano); local 114 assertEquals(f.format(instant), expected); 183 {9, Instant.MAX.getEpochSecond(), 999999999, "+1000000000-12-31T23:59:59.999999999Z"}, 184 {9, Instant.MIN.getEpochSecond(), 0, "-1000000000-01-01T00:00:00.000000000Z"}, 190 Instant instant = Instant.ofEpochSecond(instantSecs, nano) local [all...] |
/external/libmojo/base/android/java/src/org/chromium/base/ |
PerfTraceEvent.java | 51 INSTANT("I"); 121 * logged whenever {@link #instant(String)}, {@link #begin(String)}, or {@link #end(String)} 138 * If this feature is enabled, whenever {@link #instant(String)}, {@link #begin(String)}, 159 * Record an "instant" perf trace event. E.g. "screen update happened". 161 public static synchronized void instant(String name) { method in class:PerfTraceEvent 162 // Instant doesn't really need/take an event id, but this should be okay. 164 TraceEvent.instant(name); 166 savePerfString(name, eventId, EventType.INSTANT, false); 247 // Done after calculating the instant perf data to ensure calculating the memory usage
|
TraceEvent.java | 137 TraceEvent.instant("TraceEvent.LooperMonitor:IdleStats", message); 218 * Triggers the 'instant' native trace event with no arguments. 221 public static void instant(String name) { method in class:TraceEvent 226 * Triggers the 'instant' native trace event. 230 public static void instant(String name, String arg) { method in class:TraceEvent
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
FileTime.java | 28 import java.time.Instant; 53 * this {@code FileTime} is converted from an {@code Instant}, 65 * The value as Instant (created lazily, if not from an instant) 67 private Instant instant; field in class:FileTime 77 private FileTime(long value, TimeUnit unit, Instant instant) { 80 this.instant = instant; [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/ |
TestOffsetDateTime_instants.java | 65 import java.time.Instant; 88 OffsetDateTime.ofInstant((Instant) null, OFFSET_PONE); 93 Instant instant = Instant.ofEpochSecond(0L); local 94 OffsetDateTime.ofInstant(instant, (ZoneOffset) null); 99 Instant instant = Instant.ofEpochSecond(i); local 100 OffsetDateTime test = OffsetDateTime.ofInstant(instant, OFFSET_PONE) 114 Instant instant = Instant.ofEpochSecond(i * 24L * 60L * 60L); local 135 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L); local 148 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L); local 157 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MIN.getTotalSeconds()); local 173 Instant instant = Instant.ofEpochSecond(days * 24L * 60L * 60L - OFFSET_MAX.getTotalSeconds()); local 189 Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MIN.getTotalSeconds()); local 205 Instant instant = Instant.ofEpochSecond((days + 1) * 24L * 60L * 60L - 1 - OFFSET_MAX.getTotalSeconds()); local 220 Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); local 226 Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); local 241 Instant instant = Instant.ofEpochSecond(i * 24L * 60L * 60L); local [all...] |
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
RateLimiterTest.java | 323 stopwatch.instant += 1000000; 359 stopwatch.instant += 1000000; 420 long startTime = stopwatch.instant; 427 return NANOSECONDS.toMillis(stopwatch.instant - startTime); 440 long instant = 0L; field in class:RateLimiterTest.FakeStopwatch 445 return NANOSECONDS.toMicros(instant); 453 instant += MICROSECONDS.toNanos(micros);
|