Home
last modified time | relevance | path

Searched refs:nanos (Results 1 - 25 of 107) sorted by relevance

12345

/third_party/protobuf/src/google/protobuf/util/
H A Dtime_util.cc60 T CreateNormalized(int64 seconds, int64 nanos);
63 Timestamp CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument
64 // Make sure nanos is in the range. in CreateNormalized()
65 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in CreateNormalized()
66 seconds += nanos / kNanosPerSecond; in CreateNormalized()
67 nanos = nanos % kNanosPerSecond; in CreateNormalized()
69 // For Timestamp nanos should be in the range [0, 999999999] in CreateNormalized()
70 if (nanos < in CreateNormalized()
83 CreateNormalized(int64 seconds, int64 nanos) CreateNormalized() argument
107 FormatNanos(int32 nanos) FormatNanos() argument
117 FormatTime(int64 seconds, int32 nanos) FormatTime() argument
121 ParseTime(const std::string& value, int64* seconds, int32* nanos) ParseTime() argument
125 CurrentTime(int64* seconds, int32* nanos) CurrentTime() argument
161 int32 nanos; FromString() local
171 int32 nanos; GetCurrentTime() local
181 int32 nanos = duration.nanos(); ToString() local
225 int64 nanos = strto64(nanos_part.c_str(), &end, 10); FromString() local
240 NanosecondsToDuration(int64 nanos) NanosecondsToDuration() argument
295 NanosecondsToTimestamp(int64 nanos) NanosecondsToTimestamp() argument
397 int32 nanos = static_cast<int32>(Uint128Low64(value % kNanosPerSecond)); ToDuration() local
436 int32 nanos = static_cast<int32>((result - seconds) * kNanosPerSecond); operator *=() local
[all...]
H A Dtime_util.h113 static Duration NanosecondsToDuration(int64 nanos);
123 // valid range of Duration, or have an invalid nanos value (i.e., larger
135 static Timestamp NanosecondsToTimestamp(int64 nanos);
142 // Timestamp is not valid (i.e., its seconds part or nanos part does not fall
199 return d1.nanos() < d2.nanos(); in operator <()
213 return d1.seconds() == d2.seconds() && d1.nanos() == d2.nanos(); in operator ==()
222 result.set_nanos(-d.nanos()); in operator -()
268 return t1.nanos() < t in operator <()
[all...]
/third_party/protobuf/python/google/protobuf/internal/
H A Dwell_known_types.py115 nanos = self.nanos % _NANOS_PER_SECOND
116 total_sec = self.seconds + (self.nanos - nanos) // _NANOS_PER_SECOND
122 if (nanos % 1e9) == 0:
126 if (nanos % 1e6) == 0:
128 return result + '.%03dZ' % (nanos / 1e6)
129 if (nanos % 1e3) == 0:
131 return result + '.%06dZ' % (nanos / 1e3)
133 return result + '.%09dZ' % nanos
[all...]
H A Dwell_known_types_test.py86 message.nanos = 0
88 message.nanos = 10000000
90 message.nanos = 10000
92 message.nanos = 10
96 message.nanos = 0
100 message.nanos = 999999999
110 self.assertEqual(100000000, message.nanos)
114 self.assertEqual(0, message.nanos)
124 message.nanos = 0
126 message.nanos
[all...]
/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
H A DDurations.java107 * range [-315,576,000,000, +315,576,000,000]. The {@code nanos} value must be in the range
111 * and a positive or negative {@code nanos} field. For durations of one second or more, a non-zero
112 * value for the {@code nanos} field must be of the same sign as the {@code seconds} field.
119 * Returns true if the given number of seconds and nanos is a valid {@link Duration}. The {@code
120 * seconds} value must be in the range [-315,576,000,000, +315,576,000,000]. The {@code nanos}
124 * and a positive or negative {@code nanos} field. For durations of one second or more, a non-zero
125 * value for the {@code nanos} field must be of the same sign as the {@code seconds} field.
128 public static boolean isValid(long seconds, int nanos) { in isValid() argument
132 if (nanos < -999999999L || nanos > in isValid()
439 normalizedDuration(long seconds, int nanos) normalizedDuration() argument
[all...]
H A DTimestamps.java137 * 9999-12-31T23:59:59Z). The {@code nanos} value must be in the range [0, +999,999,999].
140 * nanos values that count forward in time.
147 * Returns true if the given number of seconds and nanos is a valid {@link Timestamp}. The {@code
149 * 0001-01-01T00:00:00Z and 9999-12-31T23:59:59Z). The {@code nanos} value must be in the range
153 * nanos values that count forward in time.
156 public static boolean isValid(long seconds, int nanos) { in isValid() argument
160 if (nanos < 0 || nanos >= NANOS_PER_SECOND) { in isValid()
170 int nanos = timestamp.getNanos(); in checkValid()
171 if (!isValid(seconds, nanos)) { in checkValid()
387 normalizedTimestamp(long seconds, int nanos) normalizedTimestamp() argument
427 formatNanos(int nanos) formatNanos() argument
[all...]
H A DTimeUtil.java335 int nanos = (int) ((result - seconds) * 1000000000); in multiply()
336 return normalizedDuration(seconds, nanos); in multiply()
379 int nanos = value.remainder(new BigInteger(String.valueOf(NANOS_PER_SECOND))).intValue(); in createDurationFromBigInteger()
380 return normalizedDuration(seconds, nanos); in createDurationFromBigInteger()
383 private static Duration normalizedDuration(long seconds, int nanos) { in normalizedDuration() argument
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()
388 if (seconds > 0 && nanos < in normalizedDuration()
[all...]
/third_party/protobuf/src/google/protobuf/stubs/
H A Dtime.cc133 string FormatNanos(int32 nanos) { in FormatNanos() argument
134 if (nanos % kNanosPerMillisecond == 0) { in FormatNanos()
135 return StringPrintf("%03d", nanos / kNanosPerMillisecond); in FormatNanos()
136 } else if (nanos % kNanosPerMicrosecond == 0) { in FormatNanos()
137 return StringPrintf("%06d", nanos / kNanosPerMicrosecond); in FormatNanos()
139 return StringPrintf("%09d", nanos); in FormatNanos()
168 // Consumes the fractional parts of a second into nanos. For example,
169 // "010" will be parsed to 10000000 nanos.
170 const char* ParseNanos(const char* data, int32* nanos) { in ParseNanos() argument
189 *nanos in ParseNanos()
264 GetCurrentTime(int64* seconds, int32* nanos) GetCurrentTime() argument
271 FormatTime(int64 seconds, int32 nanos) FormatTime() argument
285 ParseTime(const string& value, int64* seconds, int32* nanos) ParseTime() argument
[all...]
H A Dtime_test.cc234 int32 nanos; in TEST() local
235 ASSERT_TRUE(ParseTime("0001-01-01T00:00:00Z", &seconds, &nanos)); in TEST()
236 EXPECT_EQ("0001-01-01T00:00:00Z", FormatTime(seconds, nanos)); in TEST()
237 ASSERT_TRUE(ParseTime("9999-12-31T23:59:59.999999999Z", &seconds, &nanos)); in TEST()
238 EXPECT_EQ("9999-12-31T23:59:59.999999999Z", FormatTime(seconds, nanos)); in TEST()
241 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00-08:00", &seconds, &nanos)); in TEST()
242 EXPECT_EQ("1970-01-01T08:00:00Z", FormatTime(seconds, nanos)); in TEST()
243 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00+08:00", &seconds, &nanos)); in TEST()
244 EXPECT_EQ("1969-12-31T16:00:00Z", FormatTime(seconds, nanos)); in TEST()
247 ASSERT_TRUE(ParseTime("1970-01-01T00:00:00.01Z", &seconds, &nanos)); in TEST()
[all...]
H A Dtime.h59 void PROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos);
63 // For example, "2015-05-20T13:29:35.120Z". For nanos, 0, 3, 6 or 9 fractional
67 // Note that "nanos" must in the range of [0, 999999999].
68 string PROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos);
72 int32* nanos);
/third_party/node/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/
H A Dtimestamp.js6 return { seconds: "0", nanos: 0 };
12 nanos: isSet(object.nanos) ? Number(object.nanos) : 0,
18 message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));
/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
H A DDurationPartial.cs109 int nanos = (int) (ticks % TimeSpan.TicksPerSecond) * NanosecondsPerTick; in FromTimeSpan()
110 return new Duration { Seconds = seconds, Nanos = nanos }; in FromTimeSpan()
218 "{{ \"@warning\": \"Invalid Duration\", \"seconds\": \"{0}\", \"nanos\": {1} }}", in ToJson()
249 internal static void AppendNanoseconds(StringBuilder builder, int nanos) in AppendNanoseconds() argument
251 if (nanos != 0) in AppendNanoseconds()
255 if (nanos % 1000000 == 0) in AppendNanoseconds()
257 builder.Append((nanos / 1000000).ToString("d3", CultureInfo.InvariantCulture)); in AppendNanoseconds()
259 else if (nanos % 1000 == 0) in AppendNanoseconds()
261 builder.Append((nanos / 1000).ToString("d6", CultureInfo.InvariantCulture)); in AppendNanoseconds()
265 builder.Append(nanos in AppendNanoseconds()
[all...]
/third_party/rust/crates/humantime/src/
H A Ddate.rs163 let mut nanos = 0; in parse_rfc3339_weak() variables
177 nanos += mult * (b[idx] - b'0') as u32; in parse_rfc3339_weak()
189 Ok(UNIX_EPOCH + Duration::new(total_seconds, nanos)) in parse_rfc3339_weak()
257 let nanos = dur.subsec_nanos(); in fmt()
333 let offset = if self.1 == Seconds || nanos == 0 && self.1 == Smart { in fmt()
337 buf[20] = b'0' + (nanos / 100_000_000) as u8; in fmt()
338 buf[21] = b'0' + (nanos / 10_000_000 % 10) as u8; in fmt()
339 buf[22] = b'0' + (nanos / 1_000_000 % 10) as u8; in fmt()
343 buf[20] = b'0' + (nanos / 100_000_000) as u8; in fmt()
344 buf[21] = b'0' + (nanos / 1 in fmt()
[all...]
/third_party/protobuf/php/src/Google/Protobuf/
H A DTimestamp.php86 * second values with fractions must still have non-negative nanos values
90 * Generated from protobuf field <code>int32 nanos = 2;</code>
92 private $nanos = 0; variable
104 * @type int $nanos
106 * second values with fractions must still have non-negative nanos values
148 * second values with fractions must still have non-negative nanos values
152 * Generated from protobuf field <code>int32 nanos = 2;</code>
157 return $this->nanos;
162 * second values with fractions must still have non-negative nanos values
166 * Generated from protobuf field <code>int32 nanos
173 $this->nanos = $var; global() variable
186 $this->nanos = 1000 * $datetime->format('u'); global() variable
[all...]
H A DDuration.php24 * duration.nanos = end.nanos - start.nanos;
25 * if (duration.seconds < 0 && duration.nanos > 0) {
27 * duration.nanos -= 1000000000;
28 * } else if (durations.seconds > 0 && duration.nanos < 0) {
30 * duration.nanos += 1000000000;
37 * end.nanos = start.nanos + duration.nanos;
80 private $nanos = 0; global() variable
167 $this->nanos = $var; global() variable
[all...]
/third_party/skia/tools/timer/
H A DTimeUtils.h16 static inline SkMSec NanosToMSec(double nanos) { in NanosToMSec() argument
17 const double msec = nanos * 1e-6; in NanosToMSec()
22 static inline double NanosToSeconds(double nanos) { in NanosToSeconds() argument
23 return nanos * 1e-9; in NanosToSeconds()
/third_party/skia/gm/
H A Danimatedimageblurs.cpp71 bool onAnimate(double nanos) override {
74 fNodes[i].update(nanos, fLastTime);
78 fLastTime = 1e-9 * nanos;
108 void update(double nanos, SkScalar lastTime) { in update() argument
109 SkScalar deltaTime = 1e-9 * nanos - lastTime; in update()
122 fBlur = TimeUtils::PingPong(1e-9 * nanos, kBlurAnimationDuration, fBlurOffset, 0.0f, kBlurMax); in update()
H A Dstringart.cpp70 bool onAnimate(double nanos) override {
74 SkScalar fraction = 1.0f - TimeUtils::Scaled(1e-9 * nanos, 2.0f/kDesiredDurationSecs, 2.0f);
150 bool onAnimate(double nanos) override {
151 SkScalar time = (float)(fmod(1e-9 * nanos, fDur) / fDur);
H A Dxform.cpp94 bool onAnimate(double nanos) override {
95 float scale = 3 + sinf(TimeUtils::Scaled(1e-9 * nanos, 1, 0)) * 2;
97 fRA->setRotate(TimeUtils::Scaled(1e-9 * nanos, 40, 0));
98 fB->setRotate(TimeUtils::Scaled(1e-9 * nanos, 40*sqrtf(2), 0));
/third_party/protobuf/php/src/Google/Protobuf/Internal/
H A DGPBUtil.php491 $nanos = bcmul("0" . substr($number, $pos), -1000000000); variable
493 $nanos = bcmul("0" . substr($number, $pos), 1000000000); variable
497 $nanos = 0; variable
501 $duration->setNanos($nanos);
514 $nanos = $value->getNanos(); variable
515 if ($nanos === 0) {
519 if ($nanos % 1000000 === 0) {
521 } elseif ($nanos % 1000 === 0) {
527 $nanos = bcdiv($nanos, '100000000 variable
[all...]
/third_party/protobuf/src/google/protobuf/util/internal/
H A Dprotostream_objectsource.cc88 // Utility function to format nanos.
89 const std::string FormatNanos(uint32 nanos, bool with_trailing_zeros);
339 int32 nanos = p.second; in RenderTimestamp() local
346 if (nanos < 0 || nanos >= kNanosPerSecond) { in RenderTimestamp()
349 StrCat("Timestamp nanos exceeds limit for field: ", field_name)); in RenderTimestamp()
353 ::google::protobuf::internal::FormatTime(seconds, nanos)); in RenderTimestamp()
363 int32 nanos = p.second; in RenderDuration() local
370 if (nanos <= -kNanosPerSecond || nanos > in RenderDuration()
1068 uint32 nanos = 0; ReadSecondsAndNanos() local
1139 FormatNanos(uint32 nanos, bool with_trailing_zeros) FormatNanos() argument
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/
H A DTimeValue.h98 /// \p nanos argument defaults to zero for convenience.
100 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0) in TimeValue()
101 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); } in TimeValue()
267 void getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const { in getTimespecTime()
269 nanos = nanos_; in getTimespecTime()
290 /// The nanoseconds component of the TimeValue is set to \p nanos without
296 void nanoseconds ( NanoSecondsType nanos ) { in nanoseconds()
297 this->nanos_ = nanos; in nanoseconds()
/third_party/skia/modules/skottie/gm/
H A DSkottieGM.cpp73 bool onAnimate(double nanos) override {
79 fAnimation->seek(std::fmod(1e-9 * nanos, duration) / duration);
131 bool onAnimate(double nanos) override {
137 fAnimation->seek(std::fmod(1e-9 * nanos, duration) / duration);
215 bool onAnimate(double nanos) override {
221 fAnimation->seek(std::fmod(1e-9 * nanos, duration) / duration);
/third_party/skia/samplecode/
H A DSampleCamera.cpp69 bool onAnimate(double nanos) override {
70 fRY = nanos ? TimeUtils::Scaled(1e-9 * nanos, 90, 360) : 0;
H A DSampleAnimBlur.cpp50 bool onAnimate(double nanos) override {
51 fBlurSigma = get_anim_sin(1e-9 * nanos, 100, 4, 5);
52 fCircleRadius = 3 + get_anim_sin(1e-9 * nanos, 150, 25, 3);

Completed in 13 milliseconds

12345