Searched refs:fractionBits (Results 1 – 4 of 4) sorted by relevance
/frameworks/base/core/java/android/net/sntp/ |
D | Timestamp64.java | 53 public static Timestamp64 fromComponents(long eraSeconds, int fractionBits) { in fromComponents() argument 54 return new Timestamp64(eraSeconds, fractionBits); in fromComponents() 89 int fractionBits = nanosToFractionBits(nanos); in fromInstant() local 91 return new Timestamp64(ntpEraSeconds, fractionBits); in fromInstant() 97 private Timestamp64(long eraSeconds, int fractionBits) { in Timestamp64() argument 100 "Invalid parameters. seconds=" + eraSeconds + ", fraction=" + fractionBits); in Timestamp64() 103 this.mFractionBits = fractionBits; in Timestamp64() 147 static int fractionBitsToNanos(int fractionBits) { in fractionBitsToNanos() argument 148 long fractionBitsLong = fractionBits & 0xFFFF_FFFFL; in fractionBitsToNanos()
|
/frameworks/base/core/tests/coretests/src/android/net/sntp/ |
D | Timestamp64Test.java | 54 private static void assertComponentCreation(long ntpEraSeconds, int fractionBits) { in assertComponentCreation() argument 55 Timestamp64 value = Timestamp64.fromComponents(ntpEraSeconds, fractionBits); in assertComponentCreation() 57 assertEquals(fractionBits, value.getFractionBits()); in assertComponentCreation() 67 private static void assertEqualsAndHashcode(int eraSeconds, int fractionBits) { in assertEqualsAndHashcode() argument 68 Timestamp64 one = Timestamp64.fromComponents(eraSeconds, fractionBits); in assertEqualsAndHashcode() 69 Timestamp64 two = Timestamp64.fromComponents(eraSeconds, fractionBits); in assertEqualsAndHashcode() 203 int fractionBits, long expectedNanos) { in assertInstantCreationOnlyFractionExact() argument 204 Timestamp64 timestamp64 = Timestamp64.fromComponents(0, fractionBits); in assertInstantCreationOnlyFractionExact() 271 int fractionBits = 0; in testRandomizeLowestBits() local 273 () -> Timestamp64.randomizeLowestBits(random, fractionBits, -1)); in testRandomizeLowestBits() [all …]
|
D | Duration64Test.java | 61 int fractionBits = 0xFFFF_FFFF; in testBetween_rangeChecks() local 63 .fromComponents(maxDuration64Seconds, fractionBits); in testBetween_rangeChecks()
|
/frameworks/base/core/java/android/net/ |
D | SntpClient.java | 346 int fractionBits = (int) readUnsigned32(buffer, offset + 4); in readTimeStamp() local 347 return Timestamp64.fromComponents(seconds, fractionBits); in readTimeStamp() 361 int fractionBits = timestamp.getFractionBits(); in writeTimeStamp() local 363 buffer[offset++] = (byte) (fractionBits >>> 24); in writeTimeStamp() 364 buffer[offset++] = (byte) (fractionBits >>> 16); in writeTimeStamp() 365 buffer[offset++] = (byte) (fractionBits >>> 8); in writeTimeStamp() 366 buffer[offset] = (byte) (fractionBits); in writeTimeStamp()
|