/external/protobuf/src/google/protobuf/util/ |
D | time_util.cc | 59 T CreateNormalized(int64 seconds, int64 nanos); 62 Timestamp CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument 65 seconds += nanos / kNanosPerSecond; in CreateNormalized() 70 seconds -= 1; in CreateNormalized() 73 GOOGLE_DCHECK(seconds >= TimeUtil::kTimestampMinSeconds && in CreateNormalized() 74 seconds <= TimeUtil::kTimestampMaxSeconds); in CreateNormalized() 76 result.set_seconds(seconds); in CreateNormalized() 82 Duration CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument 85 seconds += nanos / kNanosPerSecond; in CreateNormalized() 89 if (seconds < 0 && nanos > 0) { in CreateNormalized() [all …]
|
D | time_util.h | 104 static Duration SecondsToDuration(int64 seconds); 126 static Timestamp SecondsToTimestamp(int64 seconds); 182 if (d1.seconds() == d2.seconds()) { 185 return d1.seconds() < d2.seconds(); 197 return d1.seconds() == d2.seconds() && d1.nanos() == d2.nanos(); 205 result.set_seconds(-d.seconds()); 249 if (t1.seconds() == t2.seconds()) { 252 return t1.seconds() < t2.seconds(); 264 return t1.seconds() == t2.seconds() && t1.nanos() == t2.nanos();
|
/external/protobuf/src/google/protobuf/stubs/ |
D | time.cc | 211 bool SecondsToDateTime(int64 seconds, DateTime* time) { in SecondsToDateTime() argument 212 if (seconds < kMinTime || seconds > kMaxTime) { in SecondsToDateTime() 216 seconds = seconds + kSecondsFromEraToEpoch; in SecondsToDateTime() 218 if (seconds >= kSecondsPer400Years) { in SecondsToDateTime() 219 int count_400years = seconds / kSecondsPer400Years; in SecondsToDateTime() 221 seconds %= kSecondsPer400Years; in SecondsToDateTime() 223 while (seconds >= SecondsPer100Years(year)) { in SecondsToDateTime() 224 seconds -= SecondsPer100Years(year); in SecondsToDateTime() 227 while (seconds >= SecondsPer4Years(year)) { in SecondsToDateTime() 228 seconds -= SecondsPer4Years(year); in SecondsToDateTime() [all …]
|
D | time_test.cc | 68 int64 seconds; in TEST() local 69 ASSERT_TRUE(DateTimeToSeconds(time, &seconds)); in TEST() 70 EXPECT_EQ(1, seconds); in TEST() 79 ASSERT_TRUE(DateTimeToSeconds(time, &seconds)); in TEST() 80 EXPECT_EQ(-1, seconds); in TEST() 100 ASSERT_TRUE(DateTimeToSeconds(time, &seconds)); in TEST() 101 EXPECT_EQ(start_time, seconds); in TEST() 103 ASSERT_TRUE(DateTimeToSeconds(time, &seconds)); in TEST() 104 EXPECT_EQ(end_time, seconds); in TEST() 180 int64 seconds; in TEST() local [all …]
|
/external/python/cpython3/Tools/importbench/ |
D | importbench.py | 20 def bench(name, cleanup=lambda: None, *, seconds=1, repeat=3): argument 28 while total_time < seconds: 36 if total_time > seconds: 38 yield count // seconds 40 def from_cache(seconds, repeat): argument 48 yield from bench(name, repeat=repeat, seconds=seconds) 51 def builtin_mod(seconds, repeat): argument 58 seconds=seconds) 61 def source_wo_bytecode(seconds, repeat): argument 74 seconds=seconds) [all …]
|
/external/squashfs-tools/RELEASE-READMEs/ |
D | PERFORMANCE.README | 35 Zisofs 49.88 seconds (User 2.60 secs, Sys 11.19 secs) 36 Cloop 20.80 seconds (User 2.71 secs, Sys 13.50 secs) 37 Squashfs2.0 16.56 seconds (User 2.42 secs, Sys 10.37 secs) 38 Squashfs2.1 10.14 seconds (User 2.48 secs, Sys 4.44 secs) 45 Zisofs 27 minutes 28.54 seconds (User 3.00 secs, Sys 1 min 4.80 secs) 46 Cloop 5 minutes 55.72 seconds (User 2.90 secs, Sys 3 min 37.90 secs) 47 Squashfs2.0 5 minutes 20.87 seconds (User 2.33 secs, Sys 56.98 secs) 48 Squashfs2.1 5 minutes 15.46 seconds (user 2.28 secs, Sys 51.12 secs) 58 Zisofs 101 minutes 29.65 seconds (User 5.33 secs, Sys 1 min 17.20 secs) 59 Cloop 35 minutes 27.51 seconds (user 5.93 secs, Sys 4 mins 30.23 secs) [all …]
|
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/ |
D | DurationPartial.cs | 65 internal static bool IsNormalized(long seconds, int nanoseconds) in IsNormalized() argument 68 if (seconds < MinSeconds || seconds > MaxSeconds || in IsNormalized() 75 return Math.Sign(seconds) * Math.Sign(nanoseconds) != -1; in IsNormalized() 108 long seconds = ticks / TimeSpan.TicksPerSecond; in FromTimeSpan() 110 return new Duration { Seconds = seconds, Nanos = nanos }; in FromTimeSpan() 164 internal static Duration Normalize(long seconds, int nanoseconds) in Normalize() argument 168 seconds += extraSeconds; in Normalize() 172 if (seconds < 0 && nanoseconds > 0) in Normalize() 174 seconds += 1; in Normalize() 177 else if (seconds > 0 && nanoseconds < 0) in Normalize() [all …]
|
D | TimestampPartial.cs | 48 private static bool IsNormalized(long seconds, int nanoseconds) => in IsNormalized() argument 51 seconds >= UnixSecondsAtBclMinValue && in IsNormalized() 52 seconds <= UnixSecondsAtBclMaxValue; in IsNormalized() 173 internal static Timestamp Normalize(long seconds, int nanoseconds) in Normalize() argument 176 seconds += extraSeconds; in Normalize() 182 seconds--; in Normalize() 184 return new Timestamp { Seconds = seconds, Nanos = nanoseconds }; in Normalize() 199 internal static string ToJson(long seconds, int nanoseconds, bool diagnosticOnly) in ToJson() argument 201 if (IsNormalized(seconds, nanoseconds)) in ToJson() 204 DateTime dateTime = UnixEpoch.AddSeconds(seconds); in ToJson() [all …]
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/duration/testdata/ |
D | testdata_en.txt | 115 3 seconds ago 116 2 seconds ago 118 0 seconds 120 2 seconds from now 121 3 seconds from now 122 5 seconds from now 123 10 seconds from now 124 11 seconds from now 125 12 seconds from now 126 20 seconds from now [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/duration/testdata/ |
D | testdata_en.txt | 115 3 seconds ago 116 2 seconds ago 118 0 seconds 120 2 seconds from now 121 3 seconds from now 122 5 seconds from now 123 10 seconds from now 124 11 seconds from now 125 12 seconds from now 126 20 seconds from now [all …]
|
/external/protobuf/java/util/src/main/java/com/google/protobuf/util/ |
D | TimeUtil.java | 155 long seconds = date.getTime() / MILLIS_PER_SECOND; in parseTimestamp() local 168 seconds -= offset; in parseTimestamp() 170 seconds += offset; in parseTimestamp() 174 return normalizedTimestamp(seconds, nanos); in parseTimestamp() 199 long seconds = duration.getSeconds(); in toString() local 201 if (seconds < 0 || nanos < 0) { in toString() 202 if (seconds > 0 || nanos > 0) { in toString() 208 seconds = -seconds; in toString() 211 result.append(seconds); in toString() 243 long seconds = Long.parseLong(secondValue); in parseDuration() local [all …]
|
/external/protobuf/python/google/protobuf/internal/ |
D | well_known_types.py | 107 total_sec = self.seconds + (self.nanos - nanos) // _NANOS_PER_SECOND 108 seconds = total_sec % _SECONDS_PER_DAY 109 days = (total_sec - seconds) // _SECONDS_PER_DAY 110 dt = datetime(1970, 1, 1) + timedelta(days, seconds) 156 seconds = td.seconds + td.days * _SECONDS_PER_DAY 177 seconds -= (int(timezone[1:pos])*60+int(timezone[pos+1:]))*60 179 seconds += (int(timezone[1:pos])*60+int(timezone[pos+1:]))*60 181 self.seconds = int(seconds) 190 return self.seconds * _NANOS_PER_SECOND + self.nanos 194 return (self.seconds * _MICROS_PER_SECOND + [all …]
|
/external/protobuf/objectivec/ |
D | GPBWellKnownTypes.m | 39 static NSTimeInterval TimeIntervalSince1970FromSecondsAndNanos(int64_t seconds, 41 return seconds + (NSTimeInterval)nanos / 1e9; 46 NSTimeInterval seconds; 47 NSTimeInterval nanos = modf(time, &seconds); 49 *outSeconds = (int64_t)seconds; 61 int64_t seconds; 63 timeIntervalSince1970, &seconds); 64 self.seconds = seconds; 79 return TimeIntervalSince1970FromSecondsAndNanos(self.seconds, self.nanos); 83 int64_t seconds; [all …]
|
/external/opencensus-java/api/src/main/java/io/opencensus/common/ |
D | Duration.java | 53 public static Duration create(long seconds, int nanos) { in create() argument 54 if (seconds < -MAX_SECONDS) { in create() 56 "'seconds' is less than minimum (" + -MAX_SECONDS + "): " + seconds); in create() 58 if (seconds > MAX_SECONDS) { in create() 60 "'seconds' is greater than maximum (" + MAX_SECONDS + "): " + seconds); in create() 70 if ((seconds < 0 && nanos > 0) || (seconds > 0 && nanos < 0)) { in create() 72 "'seconds' and 'nanos' have inconsistent sign: seconds=" + seconds + ", nanos=" + nanos); in create() 74 return new AutoValue_Duration(seconds, nanos); in create() 87 long seconds = millis / MILLIS_PER_SECOND; in fromMillis() local 89 return Duration.create(seconds, nanos); in fromMillis()
|
/external/golang-protobuf/ptypes/duration/ |
D | duration.proto | 44 // as a count of seconds and fractions of seconds at nanosecond 58 // duration.seconds = end.seconds - start.seconds; 61 // if (duration.seconds < 0 && duration.nanos > 0) { 62 // duration.seconds += 1; 64 // } else if (durations.seconds > 0 && duration.nanos < 0) { 65 // duration.seconds -= 1; 75 // end.seconds = start.seconds + duration.seconds; 79 // end.seconds -= 1; 82 // end.seconds += 1; 95 // object, where the string ends in the suffix "s" (indicating seconds) and [all …]
|
/external/syzkaller/vendor/github.com/golang/protobuf/ptypes/duration/ |
D | duration.proto | 44 // as a count of seconds and fractions of seconds at nanosecond 58 // duration.seconds = end.seconds - start.seconds; 61 // if (duration.seconds < 0 && duration.nanos > 0) { 62 // duration.seconds += 1; 64 // } else if (durations.seconds > 0 && duration.nanos < 0) { 65 // duration.seconds -= 1; 75 // end.seconds = start.seconds + duration.seconds; 79 // end.seconds -= 1; 82 // end.seconds += 1; 95 // object, where the string ends in the suffix "s" (indicating seconds) and [all …]
|
/external/python/dateutil/dateutil/ |
D | relativedelta.py | 93 hours=0, minutes=0, seconds=0, microseconds=0, argument 119 self.seconds = 0 154 self.seconds = delta.seconds + delta.days * 86400 169 self.seconds = seconds 222 self.seconds += div * s 223 if abs(self.seconds) > 59: 224 s = _sign(self.seconds) 225 div, mod = divmod(self.seconds * s, 60) 226 self.seconds = mod * s 243 if (self.hours or self.minutes or self.seconds or self.microseconds [all …]
|
/external/protobuf/src/google/protobuf/ |
D | duration.proto | 44 // as a count of seconds and fractions of seconds at nanosecond 56 // duration.seconds = end.seconds - start.seconds; 59 // if (duration.seconds < 0 && duration.nanos > 0) { 60 // duration.seconds += 1; 62 // } else if (durations.seconds > 0 && duration.nanos < 0) { 63 // duration.seconds -= 1; 73 // end.seconds = start.seconds + duration.seconds; 77 // end.seconds -= 1; 80 // end.seconds += 1; 87 // Signed seconds of the span of time. Must be from -315,576,000,000 [all …]
|
/external/autotest/client/site_tests/power_Draw/ |
D | control.aquarium | 15 This test will run for 3600 seconds by default. 22 seconds = 3600 26 job.run_test('power_Draw', seconds=seconds, tag=tag) 29 # wait 20 seconds to give WebGLAquarium a chance to get started. 31 # And if the CPU is too hot, it will sleep for 60 seconds. 33 job.run_test('hardware_SAT', seconds=seconds, wait_secs=120, 38 job.run_test('graphics_WebGLAquarium', test_duration_secs=seconds,
|
/external/python/dateutil/dateutil/test/ |
D | test_relativedelta.py | 22 hours=1, minutes=1, seconds=1, microseconds=1) 25 hours=1, minutes=1, seconds=1, microseconds=1) 45 relativedelta(months=-1, seconds=-1)) 49 relativedelta(months=1, seconds=1)) 54 relativedelta(months=-1, seconds=-1)) 58 relativedelta(months=1, seconds=1)) 136 hours=+20, minutes=+54, seconds=+47, 143 hours=+8, minutes=+54, seconds=+47, 225 relativedelta(seconds=float(0.5)), 275 minutes=-5, seconds=-2, microseconds=-12) [all …]
|
/external/tensorflow/tensorflow/core/lib/strings/ |
D | numbers.cc | 494 string HumanReadableElapsedTime(double seconds) { in HumanReadableElapsedTime() argument 497 if (seconds < 0) { in HumanReadableElapsedTime() 499 seconds = -seconds; in HumanReadableElapsedTime() 505 const double microseconds = seconds * 1.0e6; in HumanReadableElapsedTime() 510 double milliseconds = seconds * 1e3; in HumanReadableElapsedTime() 519 if (seconds < 60.0) { in HumanReadableElapsedTime() 520 strings::Appendf(&human_readable, "%0.3g s", seconds); in HumanReadableElapsedTime() 523 seconds /= 60.0; in HumanReadableElapsedTime() 524 if (seconds < 60.0) { in HumanReadableElapsedTime() 525 strings::Appendf(&human_readable, "%0.3g min", seconds); in HumanReadableElapsedTime() [all …]
|
/external/python/cpython3/Lib/test/libregrtest/ |
D | utils.py | 6 def format_duration(seconds): argument 7 ms = math.ceil(seconds * 1e3) 8 seconds, ms = divmod(ms, 1000) 9 minutes, seconds = divmod(seconds, 60) 17 if seconds: 18 parts.append('%s sec' % seconds)
|
/external/webrtc/webrtc/system_wrappers/include/ |
D | ntp_time.h | 24 NtpTime(uint32_t seconds, uint32_t fractions) in NtpTime() argument 25 : seconds_(seconds), fractions_(fractions) {} in NtpTime() 33 void Set(uint32_t seconds, uint32_t fractions) { in Set() argument 34 seconds_ = seconds; in Set() 47 uint32_t seconds() const { return seconds_; } in seconds() function 56 return n1.seconds() == n2.seconds() && n1.fractions() == n2.fractions();
|
/external/autotest/client/cros/power/ |
D | sys_power.py | 105 def prepare_wakeup(seconds): argument 114 assert seconds >= 2 116 alarm = int(rtc.get_seconds() + seconds) 117 logging.debug('Suspend for %d seconds, wakealarm = %d', seconds, alarm) 189 def kernel_suspend(seconds, state='mem'): argument 199 alarm, wakeup_count = prepare_wakeup(seconds) 222 def idle_suspend(seconds): argument 231 alarm, _ = prepare_wakeup(seconds) 246 def memory_suspend(seconds, size=0): argument 259 alarm, wakeup_count = prepare_wakeup(seconds)
|
/external/libcxx/test/std/utilities/time/time.duration/time.duration.nonmember/ |
D | op_-.pass.cpp | 27 std::chrono::seconds s1(3); in main() 28 std::chrono::seconds s2(5); in main() 29 std::chrono::seconds r = s1 - s2; in main() 33 std::chrono::seconds s1(3); in main() 52 constexpr std::chrono::seconds s1(3); in main() 53 constexpr std::chrono::seconds s2(5); in main() 54 constexpr std::chrono::seconds r = s1 - s2; in main() 58 constexpr std::chrono::seconds s1(3); in main()
|