Home
last modified time | relevance | path

Searched refs:seconds (Results 1 - 25 of 387) sorted by relevance

12345678910>>...16

/third_party/protobuf/src/google/protobuf/util/
H A Dtime_util.cc56 static const int kSecondsPerMinute = 60; // Note that we ignore leap seconds.
60 T CreateNormalized(int64 seconds, int64 nanos);
63 Timestamp CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument
66 seconds += nanos / kNanosPerSecond; in CreateNormalized()
71 seconds -= 1; in CreateNormalized()
74 GOOGLE_DCHECK(seconds >= TimeUtil::kTimestampMinSeconds && in CreateNormalized()
75 seconds <= TimeUtil::kTimestampMaxSeconds); in CreateNormalized()
77 result.set_seconds(seconds); in CreateNormalized()
83 Duration CreateNormalized(int64 seconds, int64 nanos) { in CreateNormalized() argument
86 seconds in CreateNormalized()
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
160 int64 seconds; FromString() local
170 int64 seconds; GetCurrentTime() local
180 int64 seconds = duration.seconds(); ToString() local
221 int64 seconds = strto64(seconds_part.c_str(), &end, 10); FromString() local
257 SecondsToDuration(int64 seconds) SecondsToDuration() argument
312 SecondsToTimestamp(int64 seconds) SecondsToTimestamp() argument
395 int64 seconds = ToDuration() local
435 int64 seconds = static_cast<int64>(result); operator *=() local
[all...]
H A Dtime_util.h42 int64 tv_sec; /* seconds */
80 // accepted as long as they fit into nano-seconds precision.
99 // to +315,576,000,000 inclusive (in seconds).
116 static Duration SecondsToDuration(int64 seconds);
120 // truncated to "-1s", and "1.5s" to "1s" when converting to seconds.
125 // seconds part).
138 static Timestamp SecondsToTimestamp(int64 seconds);
142 // Timestamp is not valid (i.e., its seconds part or nanos part does not fall
198 if (d1.seconds() == d2.seconds()) { in operator <()
[all...]
/third_party/protobuf/src/google/protobuf/stubs/
H A Dtime_test.cc68 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()
153 int64 seconds; in TEST() local
233 int64 seconds; TEST() local
[all...]
H A Dtime.cc27 // Count the seconds from the given year (start at Jan 1, 00:00) to 100 years
37 // Count the seconds from the given year (start at Jan 1, 00:00) to 4 years
89 // Count the number of seconds elapsed from 0001-01-01T00:00:00 to the given
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 / kSecondsPer400Year in SecondsToDateTime()
256 DateTimeToSeconds(const DateTime& time, int64* seconds) DateTimeToSeconds() argument
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.h50 // Converts a timestamp (seconds elapsed since 1970-01-01T00:00:00, could be
54 bool PROTOBUF_EXPORT SecondsToDateTime(int64 seconds, DateTime* time);
55 // Converts DateTime to a timestamp (seconds since 1970-01-01T00:00:00).
57 bool PROTOBUF_EXPORT DateTimeToSeconds(const DateTime& time, int64* seconds);
59 void PROTOBUF_EXPORT GetCurrentTime(int64* seconds, int32* nanos);
68 string PROTOBUF_EXPORT FormatTime(int64 seconds, int32 nanos);
71 bool PROTOBUF_EXPORT ParseTime(const string& value, int64* seconds,
/third_party/python/Tools/importbench/
H A Dimportbench.py20 def bench(name, cleanup=lambda: None, *, seconds=1, repeat=3):
28 while total_time < seconds:
36 if total_time > seconds:
38 yield count // seconds
40 def from_cache(seconds, repeat):
48 yield from bench(name, repeat=repeat, seconds=seconds)
51 def builtin_mod(seconds, repeat):
58 seconds=seconds)
[all...]
/third_party/protobuf/python/google/protobuf/internal/
H A Dwell_known_types.py116 total_sec = self.seconds + (self.nanos - nanos) // _NANOS_PER_SECOND
117 seconds = total_sec % _SECONDS_PER_DAY
118 days = (total_sec - seconds) // _SECONDS_PER_DAY
119 dt = datetime(1970, 1, 1) + timedelta(days, seconds)
140 accepted as long as they fit into nano-seconds precision.
169 seconds = td.seconds + td.days * _SECONDS_PER_DAY
190 seconds -= (int(timezone[1:pos])*60+int(timezone[pos+1:]))*60
192 seconds += (int(timezone[1:pos])*60+int(timezone[pos+1:]))*60
193 # Set seconds an
[all...]
/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
H A DDurationPartial.cs53 /// The maximum permitted number of seconds.
58 /// The minimum permitted number of seconds.
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()
161 /// Creates a duration with the normalized values from the given number of seconds and
164 internal static Duration Normalize(long seconds, in argument
197 ToJson(long seconds, int nanoseconds, bool diagnosticOnly) ToJson() argument
[all...]
/third_party/protobuf/java/util/src/main/java/com/google/protobuf/util/
H A DDurations.java106 * Returns true if the given {@link Duration} is valid. The {@code seconds} value must be in the
110 * <p><b>Note:</b> Durations less than one second are represented with a 0 {@code seconds} field
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}
123 * <p><b>Note:</b> Durations less than one second are represented with a 0 {@code seconds} field
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
129 if (seconds < DURATION_SECONDS_MIN || seconds > DURATION_SECONDS_MA in isValid()
305 fromSeconds(long seconds) fromSeconds() argument
439 normalizedDuration(long seconds, int nanos) normalizedDuration() argument
[all...]
H A DTimestamps.java135 * Returns true if the given {@link Timestamp} is valid. The {@code seconds} value must be in the
139 * <p><b>Note:</b> Negative second values with fractional seconds must still have non-negative
147 * Returns true if the given number of seconds and nanos is a valid {@link Timestamp}. The {@code
148 * seconds} value must be in the range [-62,135,596,800, +253,402,300,799] (i.e., between
152 * <p><b>Note:</b> Negative second values with fractional seconds must still have non-negative
156 public static boolean isValid(long seconds, int nanos) { in isValid() argument
157 if (seconds < TIMESTAMP_SECONDS_MIN || seconds > TIMESTAMP_SECONDS_MAX) { in isValid()
169 long seconds = timestamp.getSeconds(); in checkValid()
171 if (!isValid(seconds, nano in checkValid()
286 fromSeconds(long seconds) fromSeconds() argument
387 normalizedTimestamp(long seconds, int nanos) normalizedTimestamp() argument
[all...]
H A DTimeUtil.java80 * digits (or none) and any offset as long as they fit into nano-seconds
99 * -315,576,000,000 to +315,576,000,000 inclusive (in seconds).
334 long seconds = (long) result; in multiply()
335 int nanos = (int) ((result - seconds) * 1000000000); in multiply()
336 return normalizedDuration(seconds, nanos); in multiply()
378 long seconds = value.divide(new BigInteger(String.valueOf(NANOS_PER_SECOND))).longValue(); in createDurationFromBigInteger()
380 return normalizedDuration(seconds, nanos); in createDurationFromBigInteger()
383 private static Duration normalizedDuration(long seconds, int nanos) { in normalizedDuration() argument
385 seconds += nanos / NANOS_PER_SECOND; in normalizedDuration()
388 if (seconds > in normalizedDuration()
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/time/internal/cctz/include/cctz/
H A Dtime_zone.h39 using seconds = std::chrono::duration<std::int_fast64_t>;
40 using sys_seconds = seconds; // Deprecated. Use cctz::seconds instead.
44 inline std::pair<time_point<seconds>, D> split_seconds( in split_seconds()
46 auto sec = std::chrono::time_point_cast<seconds>(tp); in split_seconds()
49 sec -= seconds(1); in split_seconds()
50 sub += seconds(1); in split_seconds()
54 inline std::pair<time_point<seconds>, seconds> split_seconds( in split_seconds()
55 const time_point<seconds> in split_seconds()
[all...]
/third_party/rust/crates/nix/src/sys/
H A Dtime.rs146 Self::seconds(0) in zero()
154 Self::seconds(secs) in hours()
162 Self::seconds(secs) in minutes()
165 fn seconds(seconds: i64) -> Self; in seconds() functions
261 fn seconds(seconds: i64) -> TimeSpec { in seconds() functions
263 (TS_MIN_SECONDS..=TS_MAX_SECONDS).contains(&seconds), in seconds()
264 "TimeSpec out of bounds; seconds={}", in seconds()
265 seconds in seconds()
497 fn seconds(seconds: i64) -> TimeVal { seconds() functions
[all...]
/third_party/skia/third_party/externals/abseil-cpp/absl/time/internal/cctz/src/
H A Dtime_zone_lookup_test.cc740 fixed_time_zone(absl::time_internal::cctz::seconds::zero()); in TEST()
743 chrono::hours(3) + chrono::minutes(25) + chrono::seconds(45)); in TEST()
746 -(chrono::hours(12) + chrono::minutes(34) + chrono::seconds(56))); in TEST()
784 fixed_time_zone(absl::time_internal::cctz::seconds::zero()); in TEST()
793 chrono::hours(3) + chrono::minutes(25) + chrono::seconds(45)); in TEST()
797 -(chrono::hours(12) + chrono::minutes(34) + chrono::seconds(56))); in TEST()
805 fixed_time_zone(chrono::hours(24) + chrono::seconds(1)); in TEST()
809 EXPECT_EQ(fixed_time_zone(chrono::seconds(1)), in TEST()
810 fixed_time_zone(chrono::seconds(1))); in TEST()
822 // number of seconds apar in TEST()
[all...]
H A Dtime_zone_if.h42 const time_point<seconds>& tp) const = 0;
45 virtual bool NextTransition(const time_point<seconds>& tp,
47 virtual bool PrevTransition(const time_point<seconds>& tp,
57 // Convert between time_point<seconds> and a count of seconds since the
60 inline std::int_fast64_t ToUnixSeconds(const time_point<seconds>& tp) { in ToUnixSeconds()
61 return (tp - std::chrono::time_point_cast<seconds>( in ToUnixSeconds()
65 inline time_point<seconds> FromUnixSeconds(std::int_fast64_t t) { in FromUnixSeconds()
66 return std::chrono::time_point_cast<seconds>( in FromUnixSeconds()
68 seconds( in FromUnixSeconds()
[all...]
H A Dtime_zone_libc.cc190 const time_point<seconds>& tp) const { in BreakTime()
229 // If time_point<seconds> cannot hold the result we saturate. in MakeTime()
231 civil_second() + ToUnixSeconds(time_point<seconds>::min()); in MakeTime()
233 civil_second() + ToUnixSeconds(time_point<seconds>::max()); in MakeTime()
234 const time_point<seconds> tp = (cs < min_tp_cs) ? time_point<seconds>::min() in MakeTime()
236 ? time_point<seconds>::max() in MakeTime()
244 const time_point<seconds> tp = time_point<seconds>::min(); in MakeTime()
249 const time_point<seconds> t in MakeTime()
[all...]
H A Dtime_zone_fixed.cc55 bool FixedOffsetFromName(const std::string& name, seconds* offset) { in FixedOffsetFromName()
57 *offset = seconds::zero(); in FixedOffsetFromName()
80 *offset = seconds(secs * (np[0] == '-' ? -1 : 1)); // "-" means west in FixedOffsetFromName()
84 std::string FixedOffsetToName(const seconds& offset) { in FixedOffsetToName()
85 if (offset == seconds::zero()) return "UTC"; in FixedOffsetToName()
120 std::string FixedOffsetToAbbr(const seconds& offset) { in FixedOffsetToAbbr()
H A Dtime_zone_format_test.cc91 format(kFmt, chrono::time_point_cast<chrono::seconds>(t0), utc)); in TEST()
95 chrono::time_point_cast<absl::time_internal::cctz::seconds>(t0), in TEST()
106 const time_point<absl::time_internal::cctz::seconds> tp = in TEST()
107 chrono::time_point_cast<absl::time_internal::cctz::seconds>( in TEST()
109 chrono::hours(12) + chrono::minutes(34) + chrono::seconds(56); in TEST()
145 tp += chrono::hours(13) + chrono::minutes(4) + chrono::seconds(5); in TEST()
270 tp += chrono::seconds(5); in TEST()
332 tp += chrono::seconds(5); in TEST()
400 tp += chrono::seconds(5); in TEST()
434 auto tz = fixed_time_zone(absl::time_internal::cctz::seconds in TEST()
[all...]
/third_party/node/deps/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/
H A Dtimestamp.js6 return { seconds: "0", nanos: 0 };
11 seconds: isSet(object.seconds) ? String(object.seconds) : "0",
17 message.seconds !== undefined && (obj.seconds = message.seconds);
/third_party/glfw/src/
H A Dposix_poll.c48 const time_t seconds = (time_t) *timeout; in _glfwPollPOSIX() local
49 const long nanoseconds = (long) ((*timeout - seconds) * 1e9); in _glfwPollPOSIX()
50 const struct timespec ts = { seconds, nanoseconds }; in _glfwPollPOSIX()
53 const time_t seconds = (time_t) *timeout; in _glfwPollPOSIX() local
54 const long nanoseconds = (long) ((*timeout - seconds) * 1e9); in _glfwPollPOSIX()
55 const struct timespec ts = { seconds, nanoseconds }; in _glfwPollPOSIX()
/third_party/protobuf/php/src/Google/Protobuf/
H A DTimestamp.php13 * or calendar, represented as seconds and fractions of seconds at
17 * seconds long, i.e. leap seconds are "smeared" so that no leap second
39 * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
56 * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
61 * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
77 * Represents seconds of UTC time since Unix epoch
81 * Generated from protobuf field <code>int64 seconds = 1;</code>
83 private $seconds variable
141 $this->seconds = $var; global() variable
185 $this->seconds = $datetime->getTimestamp(); global() variable
[all...]
/third_party/python/Lib/test/libregrtest/
H A Dutils.py8 def format_duration(seconds):
9 ms = math.ceil(seconds * 1e3)
10 seconds, ms = divmod(ms, 1000)
11 minutes, seconds = divmod(seconds, 60)
19 if seconds:
22 parts.append('%s sec' % seconds)
25 parts.append('%.1f sec' % (seconds + ms / 1000))
/third_party/curl/tests/unit/
H A Dunit1399.c59 fprintf(stderr, "is %d us same as %d seconds? %s\n", in usec_matches_seconds()
65 static void expect_timer_seconds(struct Curl_easy *data, int seconds) in expect_timer_seconds() argument
68 msnprintf(msg, sizeof(msg), "about %d seconds should have passed", seconds); in expect_timer_seconds()
69 fail_unless(usec_matches_seconds(data->progress.t_nslookup, seconds), msg); in expect_timer_seconds()
70 fail_unless(usec_matches_seconds(data->progress.t_connect, seconds), msg); in expect_timer_seconds()
71 fail_unless(usec_matches_seconds(data->progress.t_appconnect, seconds), msg); in expect_timer_seconds()
72 fail_unless(usec_matches_seconds(data->progress.t_pretransfer, seconds), in expect_timer_seconds()
74 fail_unless(usec_matches_seconds(data->progress.t_starttransfer, seconds), in expect_timer_seconds()
80 * E.g., if t_starttransfer took 2 seconds initiall
[all...]
/third_party/FreeBSD/sys/compat/linuxkpi/common/src/
H A Dtzdst.c283 * 0~59 for seconds per minute
321 /* Seconds (0-59), not consider of the leap seconds in DST. */ in GetDaySecondsFromString()
336 INT64 seconds, days; in DstGetDayOfMonth() local
345 seconds = mktime(&time); in DstGetDayOfMonth()
347 if (seconds == -1) { in DstGetDayOfMonth()
350 days = seconds / SECSPERDAY; in DstGetDayOfMonth()
490 STATIC BOOL CheckDstPeriodInner(const struct tm * const tm, INT64 seconds, INT64 dstStart, INT64 dstEnd) in CheckDstPeriodInner() argument
495 if ((seconds >= dstStart) && (seconds < dstStart + g_dstForwardSeconds)) { in CheckDstPeriodInner()
500 if ((seconds > dstEn in CheckDstPeriodInner()
519 CheckWithinDstPeriod(const struct tm * const tm, INT64 seconds) CheckWithinDstPeriod() argument
[all...]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/
H A DTimeValue.h78 typedef int64_t SecondsType; ///< Type used for representing seconds.
97 /// Caller provides the exact value in seconds and nanoseconds. The
100 explicit TimeValue (SecondsType seconds, NanoSecondsType nanos = 0) in TimeValue() argument
101 : seconds_( seconds ), nanos_( nanos ) { this->normalize(); } in TimeValue()
103 /// Caller provides the exact value as a double in seconds with the
204 /// Returns only the seconds component of the TimeValue. The nanoseconds
206 /// @brief Retrieve the seconds component
207 SecondsType seconds() const { return seconds_; } in seconds() function in llvm::sys::TimeValue
209 /// Returns only the nanoseconds component of the TimeValue. The seconds
248 /// Converts the TimeValue into the corresponding number of seconds
267 getTimespecTime( uint64_t& seconds, uint32_t& nanos ) const getTimespecTime() argument
285 void seconds (SecondsType sec ) { seconds() function in llvm::sys::TimeValue
[all...]

Completed in 15 milliseconds

12345678910>>...16