Home
last modified time | relevance | path

Searched refs:NANOS_PER_SECOND (Results 1 – 13 of 13) sorted by relevance

/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
DTimeUtil.java54 private static final long NANOS_PER_SECOND = 1000000000; field in TimeUtil
365 new BigInteger(String.valueOf(NANOS_PER_SECOND));
378 long seconds = value.divide(new BigInteger(String.valueOf(NANOS_PER_SECOND))).longValue(); in createDurationFromBigInteger()
379 int nanos = value.remainder(new BigInteger(String.valueOf(NANOS_PER_SECOND))).intValue(); in createDurationFromBigInteger()
384 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedDuration()
385 seconds += nanos / NANOS_PER_SECOND; in normalizedDuration()
386 nanos %= NANOS_PER_SECOND; in normalizedDuration()
389 nanos += NANOS_PER_SECOND; in normalizedDuration()
393 nanos -= NANOS_PER_SECOND; in normalizedDuration()
DDurations.java43 import static com.google.protobuf.util.Timestamps.NANOS_PER_SECOND;
132 if (nanos < -999999999L || nanos >= NANOS_PER_SECOND) { in isValid()
329 nanoseconds / NANOS_PER_SECOND, (int) (nanoseconds % NANOS_PER_SECOND)); in fromNanos()
417 checkedMultiply(duration.getSeconds(), NANOS_PER_SECOND), duration.getNanos()); in toNanos()
440 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedDuration()
441 seconds = checkedAdd(seconds, nanos / NANOS_PER_SECOND); in normalizedDuration()
442 nanos %= NANOS_PER_SECOND; in normalizedDuration()
445 nanos += NANOS_PER_SECOND; // no overflow since nanos is negative (and we're adding) in normalizedDuration()
449 nanos -= NANOS_PER_SECOND; // no overflow since nanos is positive (and we're subtracting) in normalizedDuration()
DTimestamps.java62 static final long NANOS_PER_SECOND = 1000000000; field in Timestamps
160 if (nanos < 0 || nanos >= NANOS_PER_SECOND) { in isValid()
349 nanoseconds / NANOS_PER_SECOND, (int) (nanoseconds % NANOS_PER_SECOND)); in fromNanos()
357 checkedMultiply(timestamp.getSeconds(), NANOS_PER_SECOND), timestamp.getNanos()); in toNanos()
388 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedTimestamp()
389 seconds = checkedAdd(seconds, nanos / NANOS_PER_SECOND); in normalizedTimestamp()
390 nanos = (int) (nanos % NANOS_PER_SECOND); in normalizedTimestamp()
395 (nanos + NANOS_PER_SECOND); // no overflow since nanos is negative (and we're adding) in normalizedTimestamp()
/external/opencensus-java/api/src/main/java/io/opencensus/common/
DTimestamp.java23 import static io.opencensus.common.TimeUtils.NANOS_PER_SECOND;
146 durationNanos = (int) (durationNanos - NANOS_PER_SECOND); in subtractTimestamp()
149 durationNanos = (int) (durationNanos + NANOS_PER_SECOND); in subtractTimestamp()
177 epochSec = TimeUtils.checkedAdd(epochSec, nanosToAdd / NANOS_PER_SECOND); in plus()
178 nanosToAdd = nanosToAdd % NANOS_PER_SECOND; in plus()
186 long secs = TimeUtils.checkedAdd(epochSecond, floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofEpochSecond()
187 int nos = (int) floorMod(nanoAdjustment, NANOS_PER_SECOND); in ofEpochSecond()
DTimeUtils.java27 static final long NANOS_PER_SECOND = NANOS_PER_MILLI * MILLIS_PER_SECOND; field in TimeUtils
/external/cldr/tools/java/org/unicode/cldr/util/
DTimer.java8 private static final double NANOS_PER_SECOND = 1000000000.0d; field in Timer
33 return getDuration() / NANOS_PER_SECOND; in getSeconds()
45 return nf.format(getDuration() / NANOS_PER_SECOND) + "s"; in toString()
53 return nf.format(getDuration() / (NANOS_PER_SECOND * iterations)) + "s"; in toString()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DServiceConfigUtil.java456 private static final long NANOS_PER_SECOND = TimeUnit.SECONDS.toNanos(1);
463 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) {
464 seconds = checkedAdd(seconds, nanos / NANOS_PER_SECOND);
465 nanos %= NANOS_PER_SECOND;
468 nanos += NANOS_PER_SECOND; // no overflow since nanos is negative (and we're adding)
472 nanos -= NANOS_PER_SECOND; // no overflow since nanos is positive (and we're subtracting)
500 if (nanos < -999999999L || nanos >= NANOS_PER_SECOND) {
/external/drrickorang/LoopbackApp/app/src/main/cpp/
Dloopback.h36 #define NANOS_PER_SECOND 1000000000 macro
Dsles.cpp197 return (int64_t) (currentTime.tv_sec - previousTime.tv_sec) * (int64_t) NANOS_PER_SECOND + in diffInNano()
/external/exoplayer/tree/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ogg/
DOpusReader.java96 long ns = (samples * C.NANOS_PER_SECOND) / SAMPLE_RATE; in putNativeOrderLong()
/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/video/
DVideoFrameReleaseTimeHelper.java200 vsyncDurationNs = (long) (C.NANOS_PER_SECOND / defaultDisplayRefreshRate); in updateDefaultDisplayRefreshRateParams()
/external/opencensus-java/contrib/zpages/src/main/java/io/opencensus/contrib/zpages/
DRpczZPageHandler.java118 private static final double NANOS_PER_SECOND = 1e9; field in RpczZPageHandler
456 return duration.getNanos() / NANOS_PER_SECOND + duration.getSeconds(); in toDoubleSeconds()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/
DC.java79 public static final long NANOS_PER_SECOND = 1000000000L; field in C