Home
last modified time | relevance | path

Searched +full:- +full:- +full:duration +full:- +full:seconds (Results 1 – 25 of 1163) sorted by relevance

12345678910>>...47

/external/protobuf/src/google/protobuf/util/
Dtime_util.cc1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
36 #include <google/protobuf/duration.pb.h>
49 using google::protobuf::Duration;
58 static const int kSecondsPerMinute = 60; // Note that we ignore leap seconds.
62 T CreateNormalized(int64_t seconds, int64_t nanos);
65 Timestamp CreateNormalized(int64_t seconds, int64_t nanos) { in CreateNormalized() argument
67 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in CreateNormalized()
68 seconds += nanos / kNanosPerSecond; in CreateNormalized()
73 seconds -= 1; in CreateNormalized()
[all …]
/external/cronet/third_party/protobuf/src/google/protobuf/util/
Dtime_util.cc1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
36 #include <google/protobuf/duration.pb.h>
49 using google::protobuf::Duration;
58 static const int kSecondsPerMinute = 60; // Note that we ignore leap seconds.
62 T CreateNormalized(int64_t seconds, int64_t nanos);
65 Timestamp CreateNormalized(int64_t seconds, int64_t nanos) { in CreateNormalized() argument
67 if (nanos <= -kNanosPerSecond || nanos >= kNanosPerSecond) { in CreateNormalized()
68 seconds += nanos / kNanosPerSecond; in CreateNormalized()
73 seconds -= 1; in CreateNormalized()
[all …]
/external/golang-protobuf/types/known/durationpb/
Dduration_test.go2 // Use of this source code is governed by a BSD-style
13 "github.com/google/go-cmp/cmp"
14 "github.com/google/go-cmp/cmp/cmpopts"
33 in time.Duration
34 want *durpb.Duration
36 {in: time.Duration(0), want: &durpb.Duration{Seconds: 0, Nanos: 0}},
37 {in: -time.Second, want: &durpb.Duration{Seconds: -1, Nanos: 0}},
38 {in: +time.Second, want: &durpb.Duration{Seconds: +1, Nanos: 0}},
39 {in: -time.Second - time.Millisecond, want: &durpb.Duration{Seconds: -1, Nanos: -1e6}},
40 {in: +time.Second + time.Millisecond, want: &durpb.Duration{Seconds: +1, Nanos: +1e6}},
[all …]
/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
[all …]
/external/cronet/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
[all …]
/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DDurationTest.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
43 Assert.AreEqual(TimeSpan.FromSeconds(1), new Duration { Seconds = 1 }.ToTimeSpan()); in ToTimeSpan()
44 Assert.AreEqual(TimeSpan.FromSeconds(-1), new Duration { Seconds = -1 }.ToTimeSpan()); in ToTimeSpan()
45 … Assert.AreEqual(TimeSpan.FromMilliseconds(1), new Duration { Nanos = 1000000 }.ToTimeSpan()); in ToTimeSpan()
46 … Assert.AreEqual(TimeSpan.FromMilliseconds(-1), new Duration { Nanos = -1000000 }.ToTimeSpan()); in ToTimeSpan()
47 Assert.AreEqual(TimeSpan.FromTicks(1), new Duration { Nanos = 100 }.ToTimeSpan()); in ToTimeSpan()
48 Assert.AreEqual(TimeSpan.FromTicks(-1), new Duration { Nanos = -100 }.ToTimeSpan()); in ToTimeSpan()
51 Assert.AreEqual(TimeSpan.FromTicks(2), new Duration { Nanos = 250 }.ToTimeSpan()); in ToTimeSpan()
52 Assert.AreEqual(TimeSpan.FromTicks(-2), new Duration { Nanos = -250 }.ToTimeSpan()); in ToTimeSpan()
[all …]
/external/threetenbp/src/main/java/org/threeten/bp/
DDuration.java2 * Copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
16 * * Neither the name of JSR-310 nor the names of its contributors
40 import static org.threeten.bp.temporal.ChronoUnit.SECONDS;
67 * A time-based amount of time, such as '34.5 seconds'.
69 * This class models a quantity or amount of time in terms of seconds and nanoseconds.
70 * It can be accessed using other duration-based units, such as minutes and hours.
73 * See {@link Period} for the date-based equivalent to this class.
75 * A physical duration could be of infinite length.
76 * For practicality, the duration is stored with constraints similar to {@link Instant}.
77 * The duration uses nanosecond resolution with a maximum value of the seconds that can
[all …]
/external/cronet/third_party/protobuf/php/src/Google/Protobuf/
DDuration.php3 # source: google/protobuf/duration.proto
12 * A Duration represents a signed, fixed-length span of time represented
13 * as a count of seconds and fractions of seconds at nanosecond
16 * two Timestamp values is a Duration and it can be added or subtracted
17 * from a Timestamp. Range is approximately +-10,000 years.
19 * Example 1: Compute Duration from two Timestamps in pseudo code.
22 * Duration duration = ...;
23 * duration.seconds = end.seconds - start.seconds;
24 * duration.nanos = end.nanos - start.nanos;
25 * if (duration.seconds < 0 && duration.nanos > 0) {
[all …]
/external/protobuf/php/src/Google/Protobuf/
DDuration.php3 # source: google/protobuf/duration.proto
12 * A Duration represents a signed, fixed-length span of time represented
13 * as a count of seconds and fractions of seconds at nanosecond
16 * two Timestamp values is a Duration and it can be added or subtracted
17 * from a Timestamp. Range is approximately +-10,000 years.
19 * Example 1: Compute Duration from two Timestamps in pseudo code.
22 * Duration duration = ...;
23 * duration.seconds = end.seconds - start.seconds;
24 * duration.nanos = end.nanos - start.nanos;
25 * if (duration.seconds < 0 && duration.nanos > 0) {
[all …]
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
DDurations.java1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
47 import com.google.protobuf.Duration;
53 * Utilities to help create/manipulate {@code protobuf/duration.proto}. All operations throw an
54 * {@link IllegalArgumentException} if the input(s) are not {@linkplain #isValid(Duration) valid}.
57 static final long DURATION_SECONDS_MIN = -315576000000L;
64 /** A constant holding the minimum valid {@link Duration}, approximately {@code -10,000} years. */
65 public static final Duration MIN_VALUE =
66 Duration.newBuilder().setSeconds(DURATION_SECONDS_MIN).setNanos(-999999999).build();
68 /** A constant holding the maximum valid {@link Duration}, approximately {@code +10,000} years. */
[all …]
/external/cronet/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
DDurations.java1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
47 import com.google.protobuf.Duration;
53 * Utilities to help create/manipulate {@code protobuf/duration.proto}. All operations throw an
54 * {@link IllegalArgumentException} if the input(s) are not {@linkplain #isValid(Duration) valid}.
57 static final long DURATION_SECONDS_MIN = -315576000000L;
64 /** A constant holding the minimum valid {@link Duration}, approximately {@code -10,000} years. */
65 public static final Duration MIN_VALUE =
66 Duration.newBuilder().setSeconds(DURATION_SECONDS_MIN).setNanos(-999999999).build();
68 /** A constant holding the maximum valid {@link Duration}, approximately {@code +10,000} years. */
[all …]
/external/protobuf/objectivec/
DGPBDuration.pbobjc.h2 // source: google/protobuf/duration.proto
18 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
24 #pragma mark - GPBDurationRoot
39 #pragma mark - GPBDuration
47 * A Duration represents a signed, fixed-length span of time represented
48 * as a count of seconds and fractions of seconds at nanosecond
51 * two Timestamp values is a Duration and it can be added or subtracted
52 * from a Timestamp. Range is approximately +-10,000 years.
56 * Example 1: Compute Duration from two Timestamps in pseudo code.
60 * Duration duration = ...;
[all …]
/external/cronet/third_party/protobuf/objectivec/
DGPBDuration.pbobjc.h2 // source: google/protobuf/duration.proto
18 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
24 #pragma mark - GPBDurationRoot
39 #pragma mark - GPBDuration
47 * A Duration represents a signed, fixed-length span of time represented
48 * as a count of seconds and fractions of seconds at nanosecond
51 * two Timestamp values is a Duration and it can be added or subtracted
52 * from a Timestamp. Range is approximately +-10,000 years.
56 * Example 1: Compute Duration from two Timestamps in pseudo code.
60 * Duration duration = ...;
[all …]
/external/protobuf/src/google/protobuf/
Dduration.proto1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
43 // A Duration represents a signed, fixed-length span of time represented
44 // as a count of seconds and fractions of seconds at nanosecond
47 // two Timestamp values is a Duration and it can be added or subtracted
48 // from a Timestamp. Range is approximately +-10,000 years.
52 // Example 1: Compute Duration from two Timestamps in pseudo code.
56 // Duration duration = ...;
58 // duration.seconds = end.seconds - start.seconds;
59 // duration.nanos = end.nanos - start.nanos;
[all …]
/external/rust/crates/protobuf-parse/src/proto/google/protobuf/
Dduration.proto1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
43 // A Duration represents a signed, fixed-length span of time represented
44 // as a count of seconds and fractions of seconds at nanosecond
47 // two Timestamp values is a Duration and it can be added or subtracted
48 // from a Timestamp. Range is approximately +-10,000 years.
52 // Example 1: Compute Duration from two Timestamps in pseudo code.
56 // Duration duration = ...;
58 // duration.seconds = end.seconds - start.seconds;
59 // duration.nanos = end.nanos - start.nanos;
[all …]
/external/cronet/third_party/protobuf/src/google/protobuf/
Dduration.proto1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
43 // A Duration represents a signed, fixed-length span of time represented
44 // as a count of seconds and fractions of seconds at nanosecond
47 // two Timestamp values is a Duration and it can be added or subtracted
48 // from a Timestamp. Range is approximately +-10,000 years.
52 // Example 1: Compute Duration from two Timestamps in pseudo code.
56 // Duration duration = ...;
58 // duration.seconds = end.seconds - start.seconds;
59 // duration.nanos = end.nanos - start.nanos;
[all …]
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DDurationPartial.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
39 // Manually-written partial class for the Duration well-known type,
41 public partial class Duration : ICustomDiagnosticMessage class
53 /// The maximum permitted number of seconds.
58 /// The minimum permitted number of seconds.
60 public const long MinSeconds = -315576000000L;
62 internal const int MaxNanoseconds = NanosecondsPerSecond - 1;
63 internal const int MinNanoseconds = -NanosecondsPerSecond + 1;
65 internal static bool IsNormalized(long seconds, int nanoseconds) in IsNormalized() argument
[all …]
/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DDurationPartial.cs2 // Protocol Buffers - Google's data interchange format
4 // https://developers.google.com/protocol-buffers/
39 // Manually-written partial class for the Duration well-known type,
41 public partial class Duration : ICustomDiagnosticMessage class
53 /// The maximum permitted number of seconds.
58 /// The minimum permitted number of seconds.
60 public const long MinSeconds = -315576000000L;
62 internal const int MaxNanoseconds = NanosecondsPerSecond - 1;
63 internal const int MinNanoseconds = -NanosecondsPerSecond + 1;
65 internal static bool IsNormalized(long seconds, int nanoseconds) in IsNormalized() argument
[all …]
/external/abseil-cpp/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
42 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
66 TEST(Duration, ConstExpr) { in TEST() argument
67 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
69 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
70 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
71 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
72 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
77 TEST(Duration, ValueSemantics) { in TEST() argument
79 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/external/libtextclassifier/abseil-cpp/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
42 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
66 TEST(Duration, ConstExpr) { in TEST() argument
67 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
69 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
70 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
71 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
72 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
77 TEST(Duration, ValueSemantics) { in TEST() argument
79 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/external/cronet/third_party/abseil-cpp/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
42 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
66 TEST(Duration, ConstExpr) { in TEST() argument
67 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
69 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
70 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
71 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
72 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
77 TEST(Duration, ValueSemantics) { in TEST() argument
79 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/external/angle/third_party/abseil-cpp/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
42 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
66 TEST(Duration, ConstExpr) { in TEST() argument
67 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
69 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
70 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
71 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
72 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
77 TEST(Duration, ValueSemantics) { in TEST() argument
79 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/external/private-join-and-compute/third_party/abseil-cpp-20230125.2/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
40 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
64 TEST(Duration, ConstExpr) { in TEST() argument
65 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
67 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
68 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
69 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
70 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
75 TEST(Duration, ValueSemantics) { in TEST() argument
77 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/external/webrtc/third_party/abseil-cpp/absl/time/
Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
40 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
64 TEST(Duration, ConstExpr) { in TEST() argument
65 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
67 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
68 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
69 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
70 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
75 TEST(Duration, ValueSemantics) { in TEST() argument
77 constexpr absl::Duration a; // Default construction in TEST()
[all …]

12345678910>>...47