Home
last modified time | relevance | path

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

/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/util/src/main/java/com/google/protobuf/util/
DDurations.java37 import static com.google.protobuf.util.Timestamps.NANOS_PER_SECOND;
80 if (nanos < -999999999L || nanos >= NANOS_PER_SECOND) { in isValid()
216 nanoseconds / NANOS_PER_SECOND, (int) (nanoseconds % NANOS_PER_SECOND)); in fromNanos()
223 return duration.getSeconds() * NANOS_PER_SECOND + duration.getNanos(); in toNanos()
241 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedDuration()
242 seconds += nanos / NANOS_PER_SECOND; in normalizedDuration()
243 nanos %= NANOS_PER_SECOND; in normalizedDuration()
246 nanos += NANOS_PER_SECOND; in normalizedDuration()
250 nanos -= NANOS_PER_SECOND; in normalizedDuration()
DTimeUtil.java54 private static final long NANOS_PER_SECOND = 1000000000; field in TimeUtil
364 new BigInteger(String.valueOf(NANOS_PER_SECOND));
377 long seconds = value.divide(new BigInteger(String.valueOf(NANOS_PER_SECOND))).longValue(); in createDurationFromBigInteger()
378 int nanos = value.remainder(new BigInteger(String.valueOf(NANOS_PER_SECOND))).intValue(); in createDurationFromBigInteger()
383 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedDuration()
384 seconds += nanos / NANOS_PER_SECOND; in normalizedDuration()
385 nanos %= NANOS_PER_SECOND; in normalizedDuration()
388 nanos += NANOS_PER_SECOND; in normalizedDuration()
392 nanos -= NANOS_PER_SECOND; in normalizedDuration()
DTimestamps.java52 static final long NANOS_PER_SECOND = 1000000000; field in Timestamps
104 if (nanos < 0 || nanos >= NANOS_PER_SECOND) { in isValid()
264 nanoseconds / NANOS_PER_SECOND, (int) (nanoseconds % NANOS_PER_SECOND)); in fromNanos()
271 return timestamp.getSeconds() * NANOS_PER_SECOND + timestamp.getNanos(); in toNanos()
299 if (nanos <= -NANOS_PER_SECOND || nanos >= NANOS_PER_SECOND) { in normalizedTimestamp()
300 seconds += nanos / NANOS_PER_SECOND; in normalizedTimestamp()
301 nanos %= NANOS_PER_SECOND; in normalizedTimestamp()
304 nanos += NANOS_PER_SECOND; in normalizedTimestamp()
/frameworks/av/media/libaaudio/tests/
Dtest_clock_model.cpp33 #define NANOS_PER_BURST (NANOS_PER_SECOND * HW_FRAMES_PER_BURST / SAMPLE_RATE)
67 double elapsedTimeSeconds = startTimeNanos / (double) NANOS_PER_SECOND; in checkDriftingClock()
70 const double timeDelaySeconds = 10.0 * drand48() * NANOS_PER_BURST / NANOS_PER_SECOND; in checkDriftingClock()
72 const int64_t elapsedTimeNanos = (int64_t)(elapsedTimeSeconds * NANOS_PER_SECOND); in checkDriftingClock()
98 int64_t position = model.convertDeltaTimeToPosition(NANOS_PER_SECOND); in TEST_F()
103 constexpr int64_t kNanosPerBurst = HW_FRAMES_PER_BURST * NANOS_PER_SECOND / SAMPLE_RATE; in TEST_F()
104 position = model.convertDeltaTimeToPosition(NANOS_PER_SECOND + (kNanosPerBurst / 2)); in TEST_F()
108 ASSERT_EQ(NANOS_PER_SECOND, time); in TEST_F()
112 ASSERT_EQ(NANOS_PER_SECOND + (kNanosPerBurst / 2), time); in TEST_F()
Dtest_aaudio_monkey.cpp29 #define DEFAULT_TIMEOUT_NANOS (1 * NANOS_PER_SECOND)
/frameworks/av/media/libaaudio/examples/utils/
DAAudioExampleUtils.h33 #define NANOS_PER_SECOND (NANOS_PER_MILLISECOND * 1000) macro
86 time->tv_sec = nanoseconds / NANOS_PER_SECOND; in convertNanosecondsToTimespec()
88 time->tv_nsec = nanoseconds - (time->tv_sec * NANOS_PER_SECOND); in convertNanosecondsToTimespec()
98 return (time.tv_sec * NANOS_PER_SECOND) + time.tv_nsec;
126 (NANOS_PER_SECOND * deltaFrames / sampleRate); in calculateLatencyMillis()
DAAudioSimplePlayer.h229 &currentState, NANOS_PER_SECOND); in waitUntilPaused()
/frameworks/av/media/libaaudio/examples/input_monitor/src/
Dinput_monitor_callback.cpp77 .tv_nsec = NANOS_PER_SECOND / displayRateHz }; in main()
113 .tv_nsec = NANOS_PER_SECOND / displayRateHz }; in main()
/frameworks/av/media/libaaudio/examples/write_sine/src/
Dwrite_sine_callback.cpp119 myData.waker.wait(AAUDIO_OK, NANOS_PER_SECOND); in testOpenPlayClose()
/frameworks/av/media/libaudioclient/
DAudioTrack.cpp75 tv.tv_sec = static_cast<time_t>(ns / NANOS_PER_SECOND); in convertNsToTimespec()
76 tv.tv_nsec = static_cast<long>(ns % NANOS_PER_SECOND); in convertNsToTimespec()
2655 * NANOS_PER_SECOND / mSampleRate; in getTimestamp_l()
2852 deltaPosition * (long long)NANOS_PER_SECOND / deltaTime; in getTimestamp_l()
/frameworks/av/services/audioflinger/
DAudioFlinger.h439 static const int kDumpLockTimeoutNs = 1 * NANOS_PER_SECOND;
DAudioFlinger.cpp561 audio_utils_get_real_time_ns() - 10 * 60 * NANOS_PER_SECOND); in dump()
/frameworks/av/services/soundtrigger/
DSoundTriggerHwService.cpp154 static const int kDumpLockTimeoutNs = 1 * NANOS_PER_SECOND;