Home
last modified time | relevance | path

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

12345

/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.cpp25 std::chrono::nanoseconds ns1(15); in main()
26 std::chrono::nanoseconds ns2(6); in main()
27 std::chrono::nanoseconds r = ns1 % ns2; in main()
32 std::chrono::nanoseconds ns2(28); in main()
33 std::chrono::nanoseconds r = us1 % ns2; in main()
44 constexpr std::chrono::nanoseconds ns1(15); in main()
45 constexpr std::chrono::nanoseconds ns2(6); in main()
46 constexpr std::chrono::nanoseconds r = ns1 % ns2; in main()
51 constexpr std::chrono::nanoseconds ns2(28); in main()
52 constexpr std::chrono::nanoseconds r = us1 % ns2; in main()
Dop_divide_duration.pass.cpp25 std::chrono::nanoseconds ns1(15); in main()
26 std::chrono::nanoseconds ns2(5); in main()
31 std::chrono::nanoseconds ns2(5); in main()
46 constexpr std::chrono::nanoseconds ns1(15); in main()
47 constexpr std::chrono::nanoseconds ns2(5); in main()
52 constexpr std::chrono::nanoseconds ns2(5); in main()
Dop_times_rep.pass.cpp30 std::chrono::nanoseconds ns(3); in main()
38 constexpr std::chrono::nanoseconds ns(3); in main()
39 constexpr std::chrono::nanoseconds ns2 = ns * 5; in main()
41 constexpr std::chrono::nanoseconds ns3 = 6 * ns; in main()
Dop_mod_rep.pass.cpp25 std::chrono::nanoseconds ns(15); in main()
31 constexpr std::chrono::nanoseconds ns(15); in main()
32 constexpr std::chrono::nanoseconds ns2 = ns % 6; in main()
Dop_divide_rep.pass.cpp25 std::chrono::nanoseconds ns(15); in main()
31 constexpr std::chrono::nanoseconds ns(15); in main()
32 constexpr std::chrono::nanoseconds ns2 = ns / 5; in main()
/external/ImageMagick/MagickCore/
Drandom.c360 nanoseconds, in GenerateEntropicChaos() local
408 nanoseconds=0; in GenerateEntropicChaos()
417 nanoseconds=1000UL*timer.tv_usec; in GenerateEntropicChaos()
429 nanoseconds=timer.tv_nsec; in GenerateEntropicChaos()
436 SetStringInfoLength(chaos,sizeof(nanoseconds)); in GenerateEntropicChaos()
437 SetStringInfoDatum(chaos,(unsigned char *) &nanoseconds); in GenerateEntropicChaos()
439 nanoseconds=0; in GenerateEntropicChaos()
441 nanoseconds=clock(); in GenerateEntropicChaos()
449 nanoseconds=timer.tms_utime+timer.tms_stime; in GenerateEntropicChaos()
452 SetStringInfoLength(chaos,sizeof(nanoseconds)); in GenerateEntropicChaos()
[all …]
/external/libcxx/src/
Dcondition_variable.cpp50 chrono::time_point<chrono::system_clock, chrono::nanoseconds> tp) _NOEXCEPT in __do_timed_wait()
56 nanoseconds d = tp.time_since_epoch(); in __do_timed_wait()
57 if (d > nanoseconds(0x59682F000000E941)) in __do_timed_wait()
58 d = nanoseconds(0x59682F000000E941); in __do_timed_wait()
Dchrono.cpp75 nanoseconds::period>>; in now()
139 return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in now()
226 return time_point(seconds(tp.tv_sec) + nanoseconds(tp.tv_nsec)); in now()
Dthread.cpp115 sleep_for(const chrono::nanoseconds& ns) in sleep_for()
117 if (ns > chrono::nanoseconds::zero()) in sleep_for()
/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.cpp27 static_assert ( std::is_same<decltype( 3ns ), std::chrono::nanoseconds>::value, "" ); in main()
54 std::chrono::nanoseconds ns = 645ns; in main()
55 assert ( ns == std::chrono::nanoseconds(645)); in main()
Dliterals1.pass.cpp44 nanoseconds ns = 645ns; in main()
45 assert ( ns == nanoseconds(645)); in main()
Dliterals2.pass.cpp46 std::chrono::nanoseconds ns = 645ns; in main()
47 assert ( ns == std::chrono::nanoseconds(645)); in main()
/external/skia/tools/gpu/gl/
DGLTestContext.cpp91 std::chrono::nanoseconds getTimeElapsed(sk_gpu_test::PlatformTimerQuery) override;
203 std::chrono::nanoseconds GLGpuTimer::getTimeElapsed(sk_gpu_test::PlatformTimerQuery platformTimer) { in getTimeElapsed()
206 GrGLuint64 nanoseconds; in getTimeElapsed() local
207 fGLGetQueryObjectui64v(queryID, GL_QUERY_RESULT, &nanoseconds); in getTimeElapsed()
208 return std::chrono::nanoseconds(nanoseconds); in getTimeElapsed()
/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()
Dsleep_for.pass.cpp53 std::chrono::nanoseconds ns = (t1 - t0) - ms; in main()
54 std::chrono::nanoseconds err = 5 * ms / 100; in main()
/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/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/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/std/utilities/time/time.point/time.point.cast/
Dtime_point_cast.pass.cpp65 test(std::chrono::milliseconds(7265000), std::chrono::nanoseconds(7265000000000LL)); in main()
77 test_constexpr<std::chrono::milliseconds, 7265000, std::chrono::nanoseconds,7265000000000LL> (); in main()
/external/libcxx/src/experimental/filesystem/
Doperations.cpp531 constexpr auto max_nsec = duration_cast<nanoseconds>(
537 constexpr auto min_nsec_timespec = duration_cast<nanoseconds>(
541 static_assert((seconds(min_seconds) + duration_cast<microseconds>(nanoseconds(min_nsec_timespec)))
585 auto nsecs = duration_cast<nanoseconds>(tm.time_since_epoch() - secs); in is_representable()
609 auto adj_msec = duration_cast<microseconds>(nanoseconds(tm.tv_nsec)); in convert_timespec()
613 } else if (duration_cast<microseconds>(nanoseconds(tm.tv_nsec)).count() == 0) { in convert_timespec()
616 auto adj_subsec = duration_cast<microseconds>(seconds(1) - nanoseconds(tm.tv_nsec)); in convert_timespec()
700 tbuf[0].tv_usec = duration_cast<microseconds>(nanoseconds(atime.tv_nsec)).count(); in __last_write_time()
717 const bool overflowed = !detail::set_times_checked<nanoseconds>( in __last_write_time()

12345