/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKClock.java | 77 final long millis; field in TCKClock.MockInstantClock 79 MockInstantClock(long millis, ZoneId zone) { in MockInstantClock() argument 80 this.millis = millis; in MockInstantClock() 84 public long millis() { in millis() method in TCKClock.MockInstantClock 85 return millis; in millis() 89 return Instant.ofEpochMilli(millis()); in instant() 97 return new MockInstantClock(millis, timeZone); in withZone() 121 assertEquals(MOCK_INSTANT.millis(), INSTANT.toEpochMilli()); in test_mockInstantClock_get() 130 assertEquals(MOCK_INSTANT.millis(), INSTANT.toEpochMilli()); in test_mockInstantClock_withZone()
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | Gregorian.java | 68 public Date getCalendarDate(long millis) { in getCalendarDate() argument 69 return getCalendarDate(millis, newCalendarDate()); in getCalendarDate() 72 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() argument 73 return (Date) super.getCalendarDate(millis, date); in getCalendarDate() 76 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument 77 return getCalendarDate(millis, newCalendarDate(zone)); in getCalendarDate()
|
D | CalendarDate.java | 77 private int millis; // fractional part of the second field in CalendarDate 279 return millis; in getMillis() 282 public CalendarDate setMillis(int millis) { in setMillis() argument 283 if (this.millis != millis) { in setMillis() 284 this.millis = millis; in setMillis() 292 millis += n; in addMillis() 319 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument 323 setMillis(millis); in setTimeOfDay() 327 public CalendarDate addTimeOfDay(int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument 331 addMillis(millis); in addTimeOfDay() [all …]
|
D | LocalGregorianCalendar.java | 198 public Date getCalendarDate(long millis) { in getCalendarDate() argument 199 return getCalendarDate(millis, newCalendarDate()); in getCalendarDate() 203 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument 204 return getCalendarDate(millis, newCalendarDate(zone)); in getCalendarDate() 208 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() argument 209 Date ldate = (Date) super.getCalendarDate(millis, date); in getCalendarDate() 210 return adjustYear(ldate, millis, ldate.getZoneOffset()); in getCalendarDate() 213 private Date adjustYear(Date ldate, long millis, int zoneOffset) { in adjustYear() argument 221 if (millis >= since) { in adjustYear() 293 long millis = 0; in normalize() local [all …]
|
D | JulianCalendar.java | 125 public Date getCalendarDate(long millis) { in getCalendarDate() argument 126 return getCalendarDate(millis, newCalendarDate()); in getCalendarDate() 129 public Date getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() argument 130 return (Date) super.getCalendarDate(millis, date); in getCalendarDate() 133 public Date getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument 134 return getCalendarDate(millis, newCalendarDate(zone)); in getCalendarDate()
|
D | AbstractCalendar.java | 107 public CalendarDate getCalendarDate(long millis) { in getCalendarDate() argument 108 return getCalendarDate(millis, newCalendarDate()); in getCalendarDate() 111 public CalendarDate getCalendarDate(long millis, TimeZone zone) { in getCalendarDate() argument 113 return getCalendarDate(millis, date); in getCalendarDate() 116 public CalendarDate getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() argument 130 zoneOffset = zi.getOffset(millis); in getCalendarDate() 149 days += millis / DAY_IN_MILLIS; in getCalendarDate() 150 ms += (int) (millis % DAY_IN_MILLIS); in getCalendarDate()
|
D | CalendarSystem.java | 221 public abstract CalendarDate getCalendarDate(long millis); in getCalendarDate() argument 223 public abstract CalendarDate getCalendarDate(long millis, CalendarDate date); in getCalendarDate() argument 225 public abstract CalendarDate getCalendarDate(long millis, TimeZone zone); in getCalendarDate() argument
|
D | ImmutableGregorianDate.java | 137 public CalendarDate setMillis(int millis) { in setMillis() argument 157 public CalendarDate setTimeOfDay(int hours, int minutes, int seconds, int millis) { in setTimeOfDay() argument 161 public CalendarDate addTimeOfDay(int hours, int minutes, int seconds, int millis) { in addTimeOfDay() argument
|
/libcore/ojluni/src/main/java/java/time/ |
D | Clock.java | 397 public long millis() { in millis() method in Clock 466 public long millis() { in millis() method in Clock.SystemClock 471 return Instant.ofEpochMilli(millis()); in instant() 516 public long millis() { in millis() method in Clock.FixedClock 566 public long millis() { in millis() method in Clock.OffsetClock 567 return Math.addExact(baseClock.millis(), offset.toMillis()); in millis() 616 public long millis() { in millis() method in Clock.TickClock 617 long millis = baseClock.millis(); in millis() local 618 return millis - Math.floorMod(millis, tickNanos / 1000_000L); in millis() 623 long millis = baseClock.millis(); in instant() local [all …]
|
D | Duration.java | 253 public static Duration ofMillis(long millis) { in ofMillis() argument 254 long secs = millis / 1000; in ofMillis() 255 int mos = (int) (millis % 1000); in ofMillis() 1165 long millis = Math.multiplyExact(seconds, 1000); in toMillis() local 1166 millis = Math.addExact(millis, nanos / 1000_000); in toMillis() 1167 return millis; in toMillis()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | DateTest.java | 97 private static void check_convertFromAndToInstant_milliseconds(long millis) { in check_convertFromAndToInstant_milliseconds() argument 98 assertEquals(new Date(millis), Date.from(Instant.ofEpochMilli(millis))); in check_convertFromAndToInstant_milliseconds() 99 assertEquals(new Date(millis).toInstant(), Instant.ofEpochMilli(millis)); in check_convertFromAndToInstant_milliseconds() 164 private static void check_convertToInstantAndBack(long millis) { in check_convertToInstantAndBack() argument 165 Date date = new Date(millis); in check_convertToInstantAndBack() 169 assertEquals(instant, Instant.ofEpochMilli(millis)); in check_convertToInstantAndBack() 172 assertEquals(millis, date.getTime()); in check_convertToInstantAndBack() 173 assertEquals(millis, instant.toEpochMilli()); in check_convertToInstantAndBack()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | LockSupportTest.java | 51 void park(long millis) { in park() argument 56 void park(long millis) { in parkUntil() argument 57 LockSupport.parkUntil(deadline(millis)); in parkUntil() 61 void park(long millis) { in parkNanos() argument 62 LockSupport.parkNanos(MILLISECONDS.toNanos(millis)); in parkNanos() 69 void park(long millis) { in parkBlocker() argument 74 void park(long millis) { in parkUntilBlocker() argument 75 LockSupport.parkUntil(theBlocker(), deadline(millis)); in parkUntilBlocker() 79 void park(long millis) { in parkNanosBlocker() argument 81 MILLISECONDS.toNanos(millis)); in parkNanosBlocker() [all …]
|
D | SystemTest.java | 45 long millis = m2 - m1; in testNanoTime1() local 49 assertTrue(nanosAsMillis <= millis + MILLIS_ROUND); in testNanoTime1() 65 long millis = m2 - m1; in testNanoTime2() local 70 assertTrue(millis <= nanosAsMillis + MILLIS_ROUND); in testNanoTime2()
|
D | JSR166TestCase.java | 838 static void delay(long millis) throws InterruptedException { in delay() argument 839 long nanos = millis * (1000 * 1000); in delay() 842 if (millis > 0L) in delay() 843 Thread.sleep(millis); in delay() 847 millis = nanos / (1000 * 1000); in delay() 990 void assertThreadStaysAlive(Thread thread, long millis) { 993 delay(millis); 1011 void assertThreadsStayAlive(long millis, Thread... threads) { 1014 delay(millis); 1197 void sleep(long millis) { [all …]
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Thread.java | 313 public static void sleep(long millis) throws InterruptedException { in sleep() argument 314 Thread.sleep(millis, 0); in sleep() 318 private static native void sleep(Object lock, long millis, int nanos) in sleep() argument 343 public static void sleep(long millis, int nanos) in sleep() argument 345 if (millis < 0) { in sleep() 346 throw new IllegalArgumentException("millis < 0: " + millis); in sleep() 357 if (millis == 0 && nanos == 0) { in sleep() 366 long duration = (millis * NANOS_PER_MILLI) + nanos; in sleep() 373 sleep(lock, millis, nanos); in sleep() 384 millis = duration / NANOS_PER_MILLI; in sleep() [all …]
|
D | Object.java | 421 public final void wait(long millis) throws InterruptedException { in wait() argument 422 wait(millis, 0); in wait() 488 public final native void wait(long millis, int nanos) throws InterruptedException; in wait() argument
|
/libcore/luni/src/main/java/android/system/ |
D | StructTimeval.java | 39 public static StructTimeval fromMillis(long millis) { in fromMillis() argument 40 long tv_sec = millis / 1000; in fromMillis() 41 long tv_usec = (millis - (tv_sec * 1000)) * 1000; in fromMillis()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestInstant.java | 93 public void test_epochMillis(String name, long millis) { in test_epochMillis() argument 94 Instant t1 = Instant.ofEpochMilli(millis); in test_epochMillis() 96 assertEquals(millis, m, name); in test_epochMillis()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 313 int year, month, day, hour, minute, second, millis; in getTime() local 354 millis = 0; in getTime() 374 millis += 100 * Character.digit((char)buf[pos++], 10); in getTime() 375 millis += 10 * Character.digit((char)buf[pos++], 10); in getTime() 376 millis += Character.digit((char)buf[pos++], 10); in getTime() 379 millis += 100 * Character.digit((char)buf[pos++], 10); in getTime() 380 millis += 10 * Character.digit((char)buf[pos++], 10); in getTime() 383 millis += 100 * Character.digit((char)buf[pos++], 10); in getTime() 406 date.setTimeOfDay(hour, minute, second, millis); in getTime()
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | LogRecord.java | 122 private long millis; field in LogRecord 184 millis = System.currentTimeMillis(); in LogRecord() 425 return millis; in getMillis() 433 public void setMillis(long millis) { in setMillis() argument 434 this.millis = millis; in setMillis()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronoImpl.java | 109 long millis = jodt.toInstant().toEpochMilli(); in test_JapaneseChrono_vsCalendar() local 111 cal.setTimeInMillis(millis); in test_JapaneseChrono_vsCalendar() 136 long millis = jodt.toInstant().toEpochMilli(); in test_dayOfYearVsCalendar() local 138 cal.setTimeInMillis(millis); in test_dayOfYearVsCalendar()
|
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
D | FinalizeTest.java | 120 public void createSlowFinalizer(final long millis, final CountDownLatch latch) { in createSlowFinalizer() argument 123 System.out.println("finalize sleeping " + millis + " ms"); in createSlowFinalizer() 124 Thread.sleep(millis); in createSlowFinalizer()
|
/libcore/luni/src/main/java/libcore/util/ |
D | ZoneInfo.java | 377 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { in getOffset() argument 397 calc += millis; in getOffset() 447 int findOffsetIndexForTimeInMilliseconds(long millis) { in findOffsetIndexForTimeInMilliseconds() argument 460 return findOffsetIndexForTimeInSeconds(roundDownMillisToSeconds(millis)); in findOffsetIndexForTimeInMilliseconds() 477 static long roundDownMillisToSeconds(long millis) { in roundDownMillisToSeconds() argument 478 if (millis < 0) { in roundDownMillisToSeconds() 484 return (millis - 999) / 1000; in roundDownMillisToSeconds() 486 return millis / 1000; in roundDownMillisToSeconds() 504 static long roundUpMillisToSeconds(long millis) { in roundUpMillisToSeconds() argument 505 if (millis > 0) { in roundUpMillisToSeconds() [all …]
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | OldResultSetGetterTests.java | 933 long millis = cal.getTime().getTime(); in testGetTimeInt() local 934 Time t1 = new java.sql.Time(millis); in testGetTimeInt() 992 long millis = cal1.getTime().getTime(); in testGetTimeIntCalendar() local 993 Time t1 = new java.sql.Time(millis); in testGetTimeIntCalendar() 1057 long millis = cal.getTime().getTime(); in testGetTimeString() local 1058 Time t1 = new java.sql.Time(millis); in testGetTimeString() 1117 long millis = cal1.getTime().getTime(); in testGetTimeStringCalendar() local 1118 Time t1 = new java.sql.Time(millis); in testGetTimeStringCalendar() 1176 long millis = cal2.getTime().getTime(); in testGetTimestampInt() local 1177 Timestamp t2 = new Timestamp(millis); in testGetTimestampInt() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | ThreadTest.java | 73 int millis = 1000; in testThreadSleep() local 76 Thread.sleep(millis); in testThreadSleep() 79 long offBy = Math.abs(elapsed - millis); in testThreadSleep()
|