Home
last modified time | relevance | path

Searched refs:nanoseconds (Results 1 – 25 of 199) sorted by relevance

12345678

/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DDurationPartial.cs65 internal static bool IsNormalized(long seconds, int nanoseconds) in IsNormalized() argument
69 nanoseconds < MinNanoseconds || nanoseconds > MaxNanoseconds) in IsNormalized()
75 return Math.Sign(seconds) * Math.Sign(nanoseconds) != -1; in IsNormalized()
164 internal static Duration Normalize(long seconds, int nanoseconds) in Normalize() argument
167 int extraSeconds = nanoseconds / NanosecondsPerSecond; in Normalize()
169 nanoseconds -= extraSeconds * NanosecondsPerSecond; in Normalize()
172 if (seconds < 0 && nanoseconds > 0) in Normalize()
175 nanoseconds -= NanosecondsPerSecond; in Normalize()
177 else if (seconds > 0 && nanoseconds < 0) in Normalize()
180 nanoseconds += NanosecondsPerSecond; in Normalize()
[all …]
DTimestampPartial.cs48 private static bool IsNormalized(long seconds, int nanoseconds) => in IsNormalized() argument
49 nanoseconds >= 0 && in IsNormalized()
50 nanoseconds <= MaxNanos && in IsNormalized()
154 … int nanoseconds = (int) (dateTime.Ticks % TimeSpan.TicksPerSecond) * Duration.NanosecondsPerTick; in FromDateTime()
155 …turn new Timestamp { Seconds = secondsSinceBclEpoch - BclSecondsAtUnixEpoch, Nanos = nanoseconds }; in FromDateTime()
173 internal static Timestamp Normalize(long seconds, int nanoseconds) in Normalize() argument
175 int extraSeconds = nanoseconds / Duration.NanosecondsPerSecond; in Normalize()
177 nanoseconds -= extraSeconds * Duration.NanosecondsPerSecond; in Normalize()
179 if (nanoseconds < 0) in Normalize()
181 nanoseconds += Duration.NanosecondsPerSecond; in Normalize()
[all …]
/external/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/
Dop_mod_duration.pass.cpp27 std::chrono::nanoseconds ns1(15); in main()
28 std::chrono::nanoseconds ns2(6); in main()
29 std::chrono::nanoseconds r = ns1 % ns2; in main()
34 std::chrono::nanoseconds ns2(28); in main()
35 std::chrono::nanoseconds r = us1 % ns2; in main()
46 constexpr std::chrono::nanoseconds ns1(15); in main()
47 constexpr std::chrono::nanoseconds ns2(6); in main()
48 constexpr std::chrono::nanoseconds r = ns1 % ns2; in main()
53 constexpr std::chrono::nanoseconds ns2(28); in main()
54 constexpr std::chrono::nanoseconds r = us1 % ns2; in main()
Dop_divide_duration.pass.cpp28 std::chrono::nanoseconds ns1(15); in main()
29 std::chrono::nanoseconds ns2(5); in main()
34 std::chrono::nanoseconds ns2(5); in main()
49 constexpr std::chrono::nanoseconds ns1(15); in main()
50 constexpr std::chrono::nanoseconds ns2(5); in main()
55 constexpr std::chrono::nanoseconds ns2(5); in main()
Dop_times_rep.pass.cpp32 std::chrono::nanoseconds ns(3); in main()
40 constexpr std::chrono::nanoseconds ns(3); in main()
41 constexpr std::chrono::nanoseconds ns2 = ns * 5; in main()
43 constexpr std::chrono::nanoseconds ns3 = 6 * ns; in main()
Dop_divide_rep.pass.cpp27 std::chrono::nanoseconds ns(15); in main()
33 constexpr std::chrono::nanoseconds ns(15); in main()
34 constexpr std::chrono::nanoseconds ns2 = ns / 5; in main()
Dop_mod_rep.pass.cpp27 std::chrono::nanoseconds ns(15); in main()
33 constexpr std::chrono::nanoseconds ns(15); in main()
34 constexpr std::chrono::nanoseconds ns2 = ns % 6; in main()
/external/grpc-grpc/src/cpp/util/
Dtime_cc.cc25 using std::chrono::nanoseconds;
41 nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); in Timepoint2Timespec()
57 nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs); in TimepointHR2Timespec()
71 duration_cast<system_clock::time_point::duration>(nanoseconds(t.tv_nsec)); in Timespec2Timepoint()
/external/tensorflow/tensorflow/core/grappler/costs/
Dcost_estimator.h100 struct NanoSeconds : std::chrono::nanoseconds {
101 NanoSeconds() : std::chrono::nanoseconds(0) {} in NanoSeconds()
102 NanoSeconds(double d) : std::chrono::nanoseconds(static_cast<int64>(d)) {} in NanoSeconds()
103 NanoSeconds(const std::chrono::nanoseconds& d) in NanoSeconds()
104 : std::chrono::nanoseconds(d) {} in NanoSeconds()
105 NanoSeconds& operator=(const std::chrono::nanoseconds& d) {
106 std::chrono::nanoseconds::operator=(d);
116 return NanoSeconds(std::chrono::nanoseconds::max()); in infinity()
/external/libcxx/src/
Dcondition_variable.cpp51 chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp) _NOEXCEPT in __do_timed_wait()
57 nanoseconds d = tp.time_since_epoch(); in __do_timed_wait()
58 if (d > nanoseconds(0x59682F000000E941)) in __do_timed_wait()
59 d = nanoseconds(0x59682F000000E941); in __do_timed_wait()
Dchrono.cpp58 nanoseconds::period>>; in now()
122 return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in now()
209 return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in now()
/external/ImageMagick/MagickCore/
Drandom.c359 nanoseconds, in GenerateEntropicChaos() local
407 nanoseconds=0; in GenerateEntropicChaos()
416 nanoseconds=1000UL*timer.tv_usec; in GenerateEntropicChaos()
428 nanoseconds=timer.tv_nsec; in GenerateEntropicChaos()
435 SetStringInfoLength(chaos,sizeof(nanoseconds)); in GenerateEntropicChaos()
436 SetStringInfoDatum(chaos,(unsigned char *) &nanoseconds); in GenerateEntropicChaos()
438 nanoseconds=0; in GenerateEntropicChaos()
440 nanoseconds=clock(); in GenerateEntropicChaos()
448 nanoseconds=timer.tms_utime+timer.tms_stime; in GenerateEntropicChaos()
451 SetStringInfoLength(chaos,sizeof(nanoseconds)); in GenerateEntropicChaos()
[all …]
/external/tensorflow/tensorflow/compiler/xla/
Dutil.cc151 string HumanReadableNumOps(double flops, double nanoseconds, in HumanReadableNumOps() argument
153 if (nanoseconds == 0) { in HumanReadableNumOps()
156 double nano_flops = flops / nanoseconds; in HumanReadableNumOps()
170 string HumanReadableNumFlops(double flops, double nanoseconds) { in HumanReadableNumFlops() argument
171 return HumanReadableNumOps(flops, nanoseconds, "FL"); in HumanReadableNumFlops()
174 string HumanReadableNumTranscendentalOps(double trops, double nanoseconds) { in HumanReadableNumTranscendentalOps() argument
175 return HumanReadableNumOps(trops, nanoseconds, "TR"); in HumanReadableNumTranscendentalOps()
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DTimestampTest.cs69 public void ToDateTime_OutOfRange(long seconds, int nanoseconds) in ToDateTime_OutOfRange() argument
71 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_OutOfRange()
81 public void ToDateTime_ValidBoundaries(long seconds, int nanoseconds) in ToDateTime_ValidBoundaries() argument
83 var value = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in ToDateTime_ValidBoundaries()
DDurationTest.cs106 public void ToTimeSpan_Invalid(long seconds, int nanoseconds) in ToTimeSpan_Invalid() argument
108 var duration = new Duration { Seconds = seconds, Nanos = nanoseconds }; in ToTimeSpan_Invalid()
117 public void ToTimeSpan_Valid(long seconds, int nanoseconds) in ToTimeSpan_Valid() argument
120 var duration = new Duration { Seconds = seconds, Nanos = nanoseconds }; in ToTimeSpan_Valid()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/
Dcoverage.txt20 STARTSEC, STARTNSEC = the start time, seconds and nanoseconds, respectively
21 FINISHSEC, FINISHNSEC = the finish time, seconds and nanoseconds, respectively
22 slepts, sleptns = amount of seconds and nanoseconds slept, respectively
/external/libcxx/test/std/utilities/time/time.duration/time.duration.literals/
Dliterals.pass.cpp29 static_assert ( std::is_same<decltype( 3ns ), std::chrono::nanoseconds>::value, "" ); in main()
56 std::chrono::nanoseconds ns = 645ns; in main()
57 assert ( ns == std::chrono::nanoseconds(645)); in main()
/external/libcxx/test/std/thread/thread.threads/thread.thread.this/
Dsleep_until.pass.cpp30 std::chrono::nanoseconds ns = (t1 - t0) - ms; in main()
31 std::chrono::nanoseconds err = 5 * ms / 100; in main()
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
DTimeUtil.java338 public static Timestamp createTimestampFromNanos(long nanoseconds) { in createTimestampFromNanos() argument
339 return normalizedTimestamp(nanoseconds / NANOS_PER_SECOND, in createTimestampFromNanos()
340 (int) (nanoseconds % NANOS_PER_SECOND)); in createTimestampFromNanos()
346 public static Duration createDurationFromNanos(long nanoseconds) { in createDurationFromNanos() argument
347 return normalizedDuration(nanoseconds / NANOS_PER_SECOND, in createDurationFromNanos()
348 (int) (nanoseconds % NANOS_PER_SECOND)); in createDurationFromNanos()
/external/skqp/tools/gpu/gl/
DGLTestContext.cpp150 std::chrono::nanoseconds getTimeElapsed(sk_gpu_test::PlatformTimerQuery) override;
262 std::chrono::nanoseconds GLGpuTimer::getTimeElapsed(sk_gpu_test::PlatformTimerQuery platformTimer) { in getTimeElapsed()
265 GrGLuint64 nanoseconds; in getTimeElapsed() local
266 fGLGetQueryObjectui64v(queryID, GL_QUERY_RESULT, &nanoseconds); in getTimeElapsed()
267 return std::chrono::nanoseconds(nanoseconds); in getTimeElapsed()
/external/skia/tools/gpu/gl/
DGLTestContext.cpp150 std::chrono::nanoseconds getTimeElapsed(sk_gpu_test::PlatformTimerQuery) override;
262 std::chrono::nanoseconds GLGpuTimer::getTimeElapsed(sk_gpu_test::PlatformTimerQuery platformTimer) { in getTimeElapsed()
265 GrGLuint64 nanoseconds; in getTimeElapsed() local
266 fGLGetQueryObjectui64v(queryID, GL_QUERY_RESULT, &nanoseconds); in getTimeElapsed()
267 return std::chrono::nanoseconds(nanoseconds); in getTimeElapsed()
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/
DChrono.cpp45 system_clock::from_time_t(mktime(&TM)) + nanoseconds(123456789); in TEST()
72 TimePoint<nanoseconds> Nano = toTimePoint(TimeT); in TEST()
88 EXPECT_EQ("1 ns", formatv("{0}", nanoseconds(1)).str()); in TEST()
/external/guava/guava-testlib/src/com/google/common/testing/
DFakeTicker.java52 public FakeTicker advance(long nanoseconds) { in advance() argument
53 nanos.addAndGet(nanoseconds); in advance()
/external/protobuf/csharp/src/Google.Protobuf.Test/
DJsonFormatterTest.cs352 public void TimestampStandalone_NonNormalized(long seconds, int nanoseconds) in TimestampStandalone_NonNormalized() argument
354 var timestamp = new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in TimestampStandalone_NonNormalized()
389 public void DurationStandalone(long seconds, int nanoseconds, string expected) in DurationStandalone() argument
391 … var json = JsonFormatter.Default.Format(new Duration { Seconds = seconds, Nanos = nanoseconds }); in DurationStandalone()
398 public void DurationStandalone_NonNormalized(long seconds, int nanoseconds) in DurationStandalone_NonNormalized() argument
400 var duration = new Duration { Seconds = seconds, Nanos = nanoseconds }; in DurationStandalone_NonNormalized()
/external/libcxx/test/libcxx/thread/thread.threads/thread.thread.this/
Dsleep_for.pass.cpp64 std::chrono::nanoseconds ns = (t1 - t0) - ms; in main()
65 std::chrono::nanoseconds err = 5 * ms / 100; in main()

12345678