Home
last modified time | relevance | path

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

12345678910>>...50

/aosp_15_r20/libcore/ojluni/src/main/java/java/time/
H A DDuration.java19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
32 * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
46 * * Neither the name of JSR-310 nor the names of its contributors
73 import static java.time.temporal.ChronoUnit.SECONDS;
98 // Android-changed: removed ValueBased paragraph.
100 * A time-based amount of time, such as '34.5 seconds'.
102 * This class models a quantity or amount of time in terms of seconds and nanoseconds.
103 * It can be accessed using other duration-based units, such as minutes and hours.
106 * See {@link Period} for the date-based equivalent to this class.
108 * A physical duration could be of infinite length.
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/16/libcore/ojluni/src/main/java/java/time/
DDuration.java19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
32 * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
46 * * Neither the name of JSR-310 nor the names of its contributors
73 import static java.time.temporal.ChronoUnit.SECONDS;
98 // Android-changed: removed ValueBased paragraph.
100 * A time-based amount of time, such as '34.5 seconds'.
102 * This class models a quantity or amount of time in terms of seconds and nanoseconds.
103 * It can be accessed using other duration-based units, such as minutes and hours.
106 * See {@link Period} for the date-based equivalent to this class.
108 * A physical duration could be of infinite length.
[all …]
/aosp_15_r20/out/soong/.intermediates/libcore/core_oj_api_files/gen/gensrcs/libcore/ojluni/src/main/java/java/time/
DDuration.java19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
32 * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos
46 * * Neither the name of JSR-310 nor the names of its contributors
73 import static java.time.temporal.ChronoUnit.SECONDS;
98 // Android-changed: removed ValueBased paragraph.
100 * A time-based amount of time, such as '34.5 seconds'.
102 * This class models a quantity or amount of time in terms of seconds and nanoseconds.
103 * It can be accessed using other duration-based units, such as minutes and hours.
106 * See {@link Period} for the date-based equivalent to this class.
108 * A physical duration could be of infinite length.
[all …]
/aosp_15_r20/external/threetenbp/src/main/java/org/threeten/bp/
H A 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 …]
/aosp_15_r20/external/protobuf/src/google/protobuf/util/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/src/google/protobuf/util/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/abseil-cpp/absl/time/
H A 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 …]
/aosp_15_r20/external/webrtc/third_party/abseil-cpp/absl/time/
H A 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 …]
/aosp_15_r20/external/private-join-and-compute/third_party/abseil-cpp-20230125.2/absl/time/
H A 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 …]
/aosp_15_r20/external/rust/android-crates-io/crates/grpcio-sys/grpc/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 …]
/aosp_15_r20/external/openscreen/third_party/abseil/src/absl/time/
H A Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
39 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
63 TEST(Duration, ConstExpr) { in TEST() argument
64 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
66 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
67 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
68 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
69 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
74 TEST(Duration, ValueSemantics) { in TEST() argument
76 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/aosp_15_r20/external/abseil-cpp/absl/time/
H A Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
47 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
71 TEST(Duration, ConstExpr) { in TEST() argument
72 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
74 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
75 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
76 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
77 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
82 TEST(Duration, ValueSemantics) { in TEST() argument
84 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/aosp_15_r20/external/angle/third_party/abseil-cpp/absl/time/
H A Dduration_test.cc7 // https://www.apache.org/licenses/LICENSE-2.0
52 absl::Duration ApproxYears(int64_t n) { return absl::Hours(n) * 365 * 24; } in ApproxYears()
76 TEST(Duration, ConstExpr) { in TEST() argument
77 constexpr absl::Duration d0 = absl::ZeroDuration(); in TEST()
79 constexpr absl::Duration d1 = absl::Seconds(1); in TEST()
80 static_assert(d1 == absl::Seconds(1), "Seconds(1)"); in TEST()
81 static_assert(d1 != absl::ZeroDuration(), "Seconds(1)"); in TEST()
82 constexpr absl::Duration d2 = absl::InfiniteDuration(); in TEST()
87 TEST(Duration, ValueSemantics) { in TEST() argument
89 constexpr absl::Duration a; // Default construction in TEST()
[all …]
/aosp_15_r20/external/golang-protobuf/types/known/durationpb/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
H A 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 …]
/aosp_15_r20/external/protobuf/java/util/src/main/java/com/google/protobuf/util/
H A 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 …]
/aosp_15_r20/external/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
H A 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 …]
/aosp_15_r20/external/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
H A 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 …]
/aosp_15_r20/external/rust/android-crates-io/crates/chrono/src/
Dtime_delta.rs1 // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
14 use core::time::Duration;
21 #[cfg(any(feature = "rkyv", feature = "rkyv-16", feature = "rkyv-32", feature = "rkyv-64"))]
28 /// The number of nanoseconds in seconds.
34 /// The number of seconds in a minute.
[all …]
/aosp_15_r20/external/cronet/third_party/protobuf/php/src/Google/Protobuf/
H A 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 …]
/aosp_15_r20/external/protobuf/php/src/Google/Protobuf/
H A 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 …]
/aosp_15_r20/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
H A 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 …]
/aosp_15_r20/external/cronet/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
H A 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 …]

12345678910>>...50