Home
last modified time | relevance | path

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

12345678910>>...16

/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_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()
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()
/external/llvm-project/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/
Dop_mod_duration.pass.cpp26 std::chrono::nanoseconds ns1(15); in main()
27 std::chrono::nanoseconds ns2(6); in main()
28 std::chrono::nanoseconds r = ns1 % ns2; in main()
33 std::chrono::nanoseconds ns2(28); in main()
34 std::chrono::nanoseconds r = us1 % ns2; in main()
45 constexpr std::chrono::nanoseconds ns1(15); in main()
46 constexpr std::chrono::nanoseconds ns2(6); in main()
47 constexpr std::chrono::nanoseconds r = ns1 % ns2; in main()
52 constexpr std::chrono::nanoseconds ns2(28); in main()
53 constexpr std::chrono::nanoseconds r = us1 % ns2; in main()
Dop_divide_duration.pass.cpp27 std::chrono::nanoseconds ns1(15); in main()
28 std::chrono::nanoseconds ns2(5); in main()
33 std::chrono::nanoseconds ns2(5); in main()
48 constexpr std::chrono::nanoseconds ns1(15); in main()
49 constexpr std::chrono::nanoseconds ns2(5); in main()
54 constexpr std::chrono::nanoseconds ns2(5); in main()
Dop_times_rep.pass.cpp32 std::chrono::nanoseconds ns(3); in main()
41 constexpr std::chrono::nanoseconds ns(3); in main()
42 constexpr std::chrono::nanoseconds ns2 = ns * 5; in main()
44 constexpr std::chrono::nanoseconds ns3 = 6 * ns; in main()
51 typedef std::chrono::nanoseconds Duration; in main()
Dop_divide_rep.pass.cpp27 typedef std::chrono::nanoseconds Dur; in main()
35 constexpr std::chrono::nanoseconds ns(15); in main()
36 constexpr std::chrono::nanoseconds ns2 = ns / 5; in main()
43 typedef std::chrono::nanoseconds Duration; in main()
/external/llvm-project/libc/benchmarks/
DLibcBenchmarkTest.cpp20 using std::chrono::nanoseconds;
67 Duration CurrentTime = nanoseconds(1); in setMeasurements()
72 CurrentTime += nanoseconds(1); in setMeasurements()
92 Options.MaxDuration = nanoseconds(10); in TEST_F()
93 setMeasurements({nanoseconds(11)}); in TEST_F()
121 {nanoseconds(1), nanoseconds(2), nanoseconds(4), nanoseconds(8)}); in TEST_F()
137 {nanoseconds(1), nanoseconds(2), nanoseconds(4), nanoseconds(8)}); in TEST_F()
/external/rust/crates/nix/src/sys/
Dtime.rs31 fn nanoseconds(nanoseconds: i64) -> Self; in nanoseconds() method
135 let nanoseconds = milliseconds.checked_mul(1_000_000) in milliseconds() localVariable
138 TimeSpec::nanoseconds(nanoseconds) in milliseconds()
144 let nanoseconds = microseconds.checked_mul(1_000) in microseconds() localVariable
147 TimeSpec::nanoseconds(nanoseconds) in microseconds()
152 fn nanoseconds(nanoseconds: i64) -> TimeSpec { in nanoseconds() method
153 let (secs, nanos) = div_mod_floor_64(nanoseconds, NANOS_PER_SEC); in nanoseconds()
207 TimeSpec::nanoseconds(-self.num_nanoseconds()) in neg()
215 TimeSpec::nanoseconds( in add()
224 TimeSpec::nanoseconds( in sub()
[all …]
/external/rust/crates/chrono/src/
Doldtime.rs134 pub fn nanoseconds(nanos: i64) -> Duration { in nanoseconds() method
473 Duration::days(2) + Duration::seconds(86399) + Duration::nanoseconds(1234567890), in test_duration()
474 Duration::days(3) + Duration::nanoseconds(234567890) in test_duration()
527 assert_eq!(Duration::nanoseconds(999).num_microseconds(), Some(0)); in test_duration_num_microseconds()
528 assert_eq!(Duration::nanoseconds(1001).num_microseconds(), Some(1)); in test_duration_num_microseconds()
529 assert_eq!(Duration::nanoseconds(-999).num_microseconds(), Some(0)); in test_duration_num_microseconds()
530 assert_eq!(Duration::nanoseconds(-1001).num_microseconds(), Some(-1)); in test_duration_num_microseconds()
553 assert_eq!(Duration::nanoseconds(1).num_nanoseconds(), Some(1)); in test_duration_num_nanoseconds()
554 assert_eq!(Duration::nanoseconds(-1).num_nanoseconds(), Some(-1)); in test_duration_num_nanoseconds()
555 assert_eq!(Duration::nanoseconds(i64::MAX).num_nanoseconds(), Some(i64::MAX)); in test_duration_num_nanoseconds()
[all …]
/external/protobuf/php/src/Google/Protobuf/Internal/
DGPBUtil.php418 $nanoseconds = 0;
437 $nanoseconds = substr($timestamp, $periodIndex + 1, $nanosecondsLength);
438 $nanoseconds = intval($nanoseconds);
455 $value->setNanos($nanoseconds);
467 $nanoseconds = static::getNanosecondsForTimestamp($value->getNanos());
468 if (!empty($nanoseconds)) {
469 $nanoseconds = ".".$nanoseconds;
472 return $date->format("Y-m-d\TH:i:s".$nanoseconds."\Z");
577 public static function getNanosecondsForTimestamp($nanoseconds) argument
579 if ($nanoseconds == 0) {
[all …]
/external/rust/crates/grpcio-sys/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/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/llvm-project/libcxx/include/
D__mutex_base328 chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
331 chrono::time_point<chrono::steady_clock, chrono::nanoseconds>) _NOEXCEPT;
335 chrono::time_point<_Clock, chrono::nanoseconds>) _NOEXCEPT;
344 chrono::nanoseconds
350 using __ns_rep = nanoseconds::rep;
355 return nanoseconds::max();
360 return nanoseconds::min();
363 return nanoseconds(static_cast<__ns_rep>(__result_float));
371 chrono::nanoseconds
377 return nanoseconds(0);
[all …]
/external/ImageMagick/MagickCore/
Drandom.c359 nanoseconds, in GenerateEntropicChaos() local
407 nanoseconds=0; in GenerateEntropicChaos()
416 nanoseconds=(size_t) (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/oboe/src/common/
DAudioClock.h62 static int sleepForNanos(int64_t nanoseconds, clockid_t clockId = CLOCK_REALTIME) {
63 if (nanoseconds > 0) {
65 time.tv_sec = nanoseconds / kNanosPerSecond;
66 time.tv_nsec = nanoseconds - (time.tv_sec * kNanosPerSecond);
/external/tensorflow/tensorflow/core/grappler/costs/
Dcost_estimator.h102 struct NanoSeconds : std::chrono::nanoseconds {
103 NanoSeconds() : std::chrono::nanoseconds(0) {} in NanoSeconds()
104 NanoSeconds(double d) : std::chrono::nanoseconds(static_cast<int64>(d)) {} in NanoSeconds()
105 NanoSeconds(const std::chrono::nanoseconds& d) in NanoSeconds()
106 : std::chrono::nanoseconds(d) {} in NanoSeconds()
107 NanoSeconds& operator=(const std::chrono::nanoseconds& d) {
108 std::chrono::nanoseconds::operator=(d);
118 return NanoSeconds(std::chrono::nanoseconds::max()); in infinity()
/external/skia/platform_tools/android/apps/skottie/
Dskottie_metric.proto18 // in nanoseconds. These values have 0 value for lottie player, because it does it renders only
40 optional int64 ui_thread_cpu_time = 12; // CPU time spent on UI thread in nanoseconds
41 optional int64 rt_thread_cpu_time = 13; // CPU time spent on RenderThread in nanoseconds
42 optional int64 hwui_tasks_cpu_time = 14; // CPU time spent on hwuiTask0/1 threads in nanoseconds
45 optional int64 total_cpu_time = 16; // Total CPU time in nanoseconds. Equals
48 optional int64 total_gpu_time = 17; // GPU time spent to render all content in nanoseconds.
52 optional int64 total_time = 18; // This is total_cpu_time + total_gpu_time in nanoseconds.
/external/openscreen/util/
Dchrono_helpers.h18 using nanoseconds = std::chrono::nanoseconds; variable
39 static constexpr nanoseconds to_nanoseconds(D d) { in to_nanoseconds()
40 return std::chrono::duration_cast<nanoseconds>(d); in to_nanoseconds()
/external/perfetto/protos/perfetto/metrics/android/
Dhwui_metric.proto30 // in nanoseconds.
36 // Number of GPU commands flushes and max/min/avg time per flush in nanoseconds.
43 // nanoseconds.
50 // in nanoseconds.
57 // max/min/avg time in nanoseconds.
64 // times to prepare a shader in nanoseconds.
69 // to prepare a shader in nanoseconds.
74 // a shader in nanoseconds.
/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()

12345678910>>...16