Searched refs:Timestamp64 (Results 1 – 6 of 6) sorted by relevance
/aosp14/frameworks/base/core/tests/coretests/src/android/net/sntp/ |
H A D | Timestamp64Test.java | 55 Timestamp64 value = Timestamp64.fromComponents(ntpEraSeconds, fractionBits); in assertComponentCreation() 68 Timestamp64 one = Timestamp64.fromComponents(eraSeconds, fractionBits); in assertEqualsAndHashcode() 69 Timestamp64 two = Timestamp64.fromComponents(eraSeconds, fractionBits); in assertEqualsAndHashcode() 99 Timestamp64 timestamp64 = Timestamp64.fromString(string); in assertStringCreation() 107 Timestamp64 mixedCaseValue = Timestamp64.fromString("AaBbCcDd.EeFf1234"); in testStringForm_lenientHexCasing() 128 -Timestamp64.OFFSET_1900_TO_1970 - Timestamp64.SECONDS_IN_ERA - 1, in testFromInstant_secondsHandling() 131 -Timestamp64.OFFSET_1900_TO_1970 + Timestamp64.SECONDS_IN_ERA - 1, in testFromInstant_secondsHandling() 144 Timestamp64.SECONDS_IN_ERA, Timestamp64.OFFSET_1900_TO_1970, era1); in testFromInstant_secondsHandling() 163 Timestamp64 timestamp = Timestamp64.fromInstant(instant); in assertInstantCreationOnlySeconds() 204 Timestamp64 timestamp64 = Timestamp64.fromComponents(0, fractionBits); in assertInstantCreationOnlyFractionExact() [all …]
|
H A D | Duration64Test.java | 18 import static android.net.sntp.Timestamp64.NANOS_PER_SECOND; 44 Timestamp64 zeroNoFrac = Timestamp64.fromComponents(0, 0); in testBetween_rangeChecks() 48 Timestamp64 ceilNoFrac = Timestamp64.fromComponents(maxDuration64Seconds, 0); in testBetween_rangeChecks() 62 Timestamp64 ceilWithFrac = Timestamp64 in testBetween_rangeChecks() 83 Timestamp64.fromComponents(10, 0)) in testBetween_smallSecondsOnly() 87 Timestamp64.fromComponents(5, 0)) in testBetween_smallSecondsOnly() 100 Timestamp64.fromComponents(5, 0), in testBetween_smallSecondsAndFraction() 214 Timestamp64 one64 = Timestamp64.fromInstant(one); in checkDuration64Behavior() 215 Timestamp64 two64 = Timestamp64.fromInstant(two); in checkDuration64Behavior() 233 Timestamp64 one64 = Timestamp64.fromInstant(one); in checkDuration64OverflowBehavior() [all …]
|
/aosp14/frameworks/base/core/java/android/net/ |
H A D | SntpClient.java | 22 import android.net.sntp.Timestamp64; 161 final Timestamp64 requestTimestamp = Timestamp64.fromInstant(requestTime); in requestTime() 163 final Timestamp64 randomizedRequestTimestamp = in requestTime() 175 final Timestamp64 responseTimestamp = Timestamp64.fromInstant(responseTime); in requestTime() 230 Timestamp64 serverReceiveTimestamp, Timestamp64 serverTransmitTimestamp, in calculateClockOffset() 231 Timestamp64 clientResponseTimestamp) { in calculateClockOffset() 305 Timestamp64 referenceTimestamp, Timestamp64 randomizedRequestTimestamp, in checkValidServerReply() 320 if (transmitTimestamp.equals(Timestamp64.ZERO)) { in checkValidServerReply() 323 if (referenceTimestamp.equals(Timestamp64.ZERO)) { in checkValidServerReply() 344 private Timestamp64 readTimeStamp(byte[] buffer, int offset) { in readTimeStamp() [all …]
|
/aosp14/frameworks/base/core/java/android/net/sntp/ |
H A D | Timestamp64.java | 39 public final class Timestamp64 { class 41 public static final Timestamp64 ZERO = fromComponents(0, 0); 54 return new Timestamp64(eraSeconds, fractionBits); in fromComponents() 58 public static Timestamp64 fromString(String string) { in fromString() 73 return new Timestamp64(eraSeconds, (int) fractionBitsAsLong); in fromString() 81 public static Timestamp64 fromInstant(Instant instant) { in fromInstant() 91 return new Timestamp64(ntpEraSeconds, fractionBits); in fromInstant() 97 private Timestamp64(long eraSeconds, int fractionBits) { in Timestamp64() method in Timestamp64 138 Timestamp64 that = (Timestamp64) o; in equals() 165 public Timestamp64 randomizeSubMillis(Random random) { in randomizeSubMillis() [all …]
|
H A D | Duration64.java | 44 public static Duration64 between(Timestamp64 startInclusive, Timestamp64 endExclusive) { in between() 89 | (Timestamp64.nanosToFractionBits(duration.getNano()) & 0xFFFF_FFFFL); in fromDuration() 139 return Timestamp64.fractionBitsToNanos((int) (mBits & 0xFFFF_FFFFL)); in getNanos()
|
/aosp14/frameworks/base/core/tests/coretests/src/android/net/ |
H A D | SntpClientTest.java | 28 import android.net.sntp.Timestamp64; 98 Timestamp64.fromString("d9ca9451.938a3771").toInstant(0); 134 Timestamp64.fromString("1db2d251.938a3771").toInstant(1); 269 Timestamp64 clientRequestTimestamp = Timestamp64.fromInstant( in checkCalculateClockOffset() 271 Timestamp64 clientResponseTimestamp = Timestamp64.fromInstant( in checkCalculateClockOffset() 273 Timestamp64 serverReceiveTimestamp = Timestamp64.fromInstant( in checkCalculateClockOffset() 275 Timestamp64 serverTransmitTimestamp = Timestamp64.fromInstant( in checkCalculateClockOffset() 503 Timestamp64 receiveTimestamp = Timestamp64.fromString(receiveTimestampString); in calculateIdealServerTime() 504 Timestamp64 transmitTimestamp = Timestamp64.fromString(transmitTimestampString); in calculateIdealServerTime()
|