Home
last modified time | relevance | path

Searched refs:Seconds (Results 1 – 25 of 37) sorted by relevance

12

/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/abseil/
H A Dduration-factory-scale.cpp18 d = absl::Seconds(0); in ScaleTest()
30 d = absl::Seconds(0.0); in ScaleTest()
36 d = absl::Seconds(int{0}); in ScaleTest()
42 d = absl::Seconds(float{0}); in ScaleTest()
47 d = absl::Seconds(30 * 60); in ScaleTest()
50 d = absl::Seconds(60 * 30); in ScaleTest()
97 d = absl::Seconds(60); in ScaleTest()
98 d = absl::Seconds(int{60}); in ScaleTest()
100 d = absl::Seconds(60 + 30); in ScaleTest()
101 d = absl::Seconds(60 - 30); in ScaleTest()
[all …]
H A Dduration-factory-float.cpp8 d = absl::Seconds(60.0); in ConvertFloatTest()
18 d = absl::Seconds(3.0f); in ConvertFloatTest()
21 d = absl::Seconds(3.); in ConvertFloatTest()
24 d = absl::Seconds(0x3.p0); in ConvertFloatTest()
27 d = absl::Seconds(0x3.p1); in ConvertFloatTest()
33 d = absl::Seconds(.001); in ConvertFloatTest()
34 d = absl::Seconds(.100); in ConvertFloatTest()
35 d = ::absl::Seconds(1); in ConvertFloatTest()
41 d = absl::Seconds(-3.0); in ConvertFloatTest()
44 d = absl::Seconds(1e12); in ConvertFloatTest()
[all …]
H A Dduration-unnecessary-conversion.cpp15 d2 = absl::Seconds(absl::ToDoubleSeconds(d1)); in f()
35 d2 = absl::Seconds(absl::ToInt64Seconds(d1)); in f()
54 d2 = absl::Seconds(d1 / absl::Seconds(1)); in f()
73 d2 = absl::Seconds(absl::FDivDuration(d1, absl::Seconds(1))); in f()
87 #define PLUS_FIVE_S(x) x + absl::Seconds(5) in f()
94 #define TOSECONDS(x) absl::Seconds(x) in f()
113 d2 = absl::Seconds(absl::ToInt64Seconds(d1) * 2); in f()
131 d2 = absl::Seconds(2 * absl::ToInt64Seconds(d1)); in f()
142 d2 = absl::Seconds(absl::ToDoubleMilliseconds(d1)); in f()
143 d2 = absl::Seconds(4); in f()
[all …]
H A Dtime-subtraction.cpp18 d = absl::Seconds(absl::ToUnixSeconds(t) - x); in f()
51 d = 5 * absl::Seconds(absl::ToUnixSeconds(t) - x); in f()
54 d = absl::Seconds(absl::ToUnixSeconds(t) - x) / 5; in f()
59 g(absl::Seconds(absl::ToUnixSeconds(t) - x)); in f()
62 g(absl::Seconds(x - absl::ToUnixSeconds(t))); in f()
73 d = absl::Seconds(absl::ToUnixMicros(t) - x); in f()
89 #define SECONDS(z) absl::Seconds(z) in f()
98 absl::Duration d = absl::Seconds(absl::ToUnixSeconds(t) - x); in func()
111 return absl::Seconds(absl::ToUnixSeconds(t) - x); in parens_in_return()
114 return absl::Seconds(x - absl::ToUnixSeconds(t)); in parens_in_return()
H A Dupgrade-duration-conversions.cpp257 (void)absl::Seconds(ConvertibleTo<int64_t>()); in factoryFunctionPositive()
277 (void)absl::Seconds(ConvertibleTo<char>()); in factoryFunctionPositive()
297 (void)absl::Seconds(ConvertibleTo<float>()); in factoryFunctionPositive()
321 (void)absl::Seconds(char{1}); in factoryFunctionNegative()
322 (void)absl::Seconds(1); in factoryFunctionNegative()
323 (void)absl::Seconds(int64_t{1}); in factoryFunctionNegative()
324 (void)absl::Seconds(1.0f); in factoryFunctionNegative()
337 (void)absl::Seconds(static_cast<int>(ConvertibleTo<int>())); in factoryFunctionNegative()
H A Dduration-subtraction.cpp35 #define THIRTY absl::Seconds(30) in f()
47 x = absl::ToDoubleSeconds(d) - absl::ToDoubleSeconds(absl::Seconds(5)); in f()
50 x = absl::ToDoubleSeconds(d) - absl::ToDoubleSeconds(absl::Seconds(absl::ToDoubleSeconds(d1))); in f()
H A Dduration-addition.cpp48 i = absl::ToUnixMicros(t) + absl::ToInt64Microseconds(absl::Seconds(1)); in f()
79 i += absl::ToInt64Microseconds(absl::Seconds(1)); in f()
H A Dtime-comparison.cpp109 #define VALUE_IF(v, e, type) (v ? VALUE_IF_2(absl::To##type##Seconds(e)) : 0) in f()
115 #define VALUE_IF(v, e, type) (v ? (5 > VALUE_IF_2(absl::To##type##Seconds(e))) : 0) in f()
H A Dduration-comparison.cpp146 #define VALUE_IF(v, e, type) (v ? VALUE_IF_2(absl::To##type##Seconds(e)) : 0) in f()
152 #define VALUE_IF(v, e, type) (v ? (5 > VALUE_IF_2(absl::To##type##Seconds(e))) : 0) in f()
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/abseil/
H A Dduration-unnecessary-conversion.rst15 absl::Duration d2 = absl::Seconds(absl::ToDoubleSeconds(d1));
21 absl::Duration d2 = absl::Seconds(absl::FDivDuration(d1, absl::Seconds(1)));
38 absl::Duration d2 = absl::Seconds(d1 / absl::Seconds(1));
49 absl::Duration d2 = absl::Seconds(absl::ToInt64Seconds(d1) * 2);
H A Dduration-division.rst14 absl::Duration d = absl::Seconds(3.5);
15 int64 sec1 = d / absl::Seconds(1); // Truncates toward 0.
19 double dsec = d / absl::Seconds(1); // WRONG: Still truncates toward 0.
28 absl::Duration d = absl::Seconds(3.5);
29 double dsec1 = absl::FDivDuration(d, absl::Seconds(1)); // GOOD: No truncation.
H A Dduration-factory-float.rst19 absl::Duration d = absl::Seconds(10.0);
22 absl::Duration d = absl::Seconds(10);
26 absl::Duration d = absl::Seconds(static_cast<double>(10));
29 absl::Duration d = absl::Seconds(10);
H A Dduration-factory-scale.rst17 absl::Duration d = absl::Seconds(60 * x);
27 // Suggested - Use absl:::Seconds instead.
28 absl::Duration d = absl::Seconds(y);
H A Dduration-addition.rst21 int result = absl::ToUnixSeconds(t + absl::Seconds(x));
/llvm-project-15.0.7/compiler-rt/lib/fuzzer/
H A DFuzzerUtilPosix.cpp106 void SetTimer(int Seconds) { in SetTimer() argument
108 {Seconds, 0}, { Seconds, 0 } in SetTimer()
143 void SleepSeconds(int Seconds) { in SleepSeconds() argument
144 sleep(Seconds); // Use C API to avoid coverage from instrumented libc++. in SleepSeconds()
H A DFuzzerUtilWindows.cpp102 void SetTimer(int Seconds) { in SetTimer() argument
112 Seconds*1000, Seconds*1000, 0)) { in SetTimer()
148 void SleepSeconds(int Seconds) { Sleep(Seconds * 1000); } in SleepSeconds() argument
H A DFuzzerInternal.h55 size_t Seconds = secondsSinceProcessStartUp(); in execPerSec() local
56 return Seconds ? TotalNumberOfRuns / Seconds : 0; in execPerSec()
H A DFuzzerUtilFuchsia.cpp70 void AlarmHandler(int Seconds) { in AlarmHandler() argument
72 SleepSeconds(Seconds); in AlarmHandler()
377 void SleepSeconds(int Seconds) { in SleepSeconds() argument
378 _zx_nanosleep(_zx_deadline_after(ZX_SEC(Seconds))); in SleepSeconds()
H A DFuzzerLoop.cpp285 size_t Seconds = in AlarmCallback() local
287 if (Seconds == 0) in AlarmCallback()
290 Printf("AlarmCallback %zd\n", Seconds); in AlarmCallback()
291 if (Seconds >= (size_t)Options.UnitTimeoutSec) { in AlarmCallback()
295 Printf("ALARM: working on the last Unit for %zd seconds\n", Seconds); in AlarmCallback()
300 Seconds); in AlarmCallback()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/
H A DDurationRewriter.cpp54 InverseMap[DurationScale::Seconds] = in getDurationInverseForScale()
110 case DurationScale::Seconds: in getDurationFactoryForScale()
128 case DurationScale::Seconds: in getTimeFactoryForScale()
147 case DurationScale::Seconds: in getTimeInverseForScale()
237 {"ToDoubleSeconds", DurationScale::Seconds}, in getScaleForDurationInverse()
238 {"ToInt64Seconds", DurationScale::Seconds}, in getScaleForDurationInverse()
257 {"ToUnixSeconds", DurationScale::Seconds}, in getScaleForTimeInverse()
H A DDurationFactoryScaleCheck.cpp30 .Case("Seconds", DurationScale::Seconds) in getScaleForFactory()
62 return std::make_tuple(DurationScale::Seconds, Multiplier * 60.0); in getNewScaleSingleStep()
65 case DurationScale::Seconds: in getNewScaleSingleStep()
74 return std::make_tuple(DurationScale::Seconds, Multiplier / 1e3); in getNewScaleSingleStep()
/llvm-project-15.0.7/clang-tools-extra/clangd/support/
H A DThreading.cpp112 Deadline timeoutSeconds(llvm::Optional<double> Seconds) { in timeoutSeconds() argument
114 if (!Seconds) in timeoutSeconds()
117 duration_cast<steady_clock::duration>(duration<double>(*Seconds)); in timeoutSeconds()
/llvm-project-15.0.7/llvm/lib/Support/
H A DTimer.cpp169 using Seconds = std::chrono::duration<double, std::ratio<1>>; in getCurrentTime() typedef
184 Result.WallTime = Seconds(now.time_since_epoch()).count(); in getCurrentTime()
185 Result.UserTime = Seconds(user).count(); in getCurrentTime()
186 Result.SystemTime = Seconds(sys).count(); in getCurrentTime()
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/abseil/Inputs/absl/time/
H A Dtime.h31 constexpr Duration Seconds(long long);
44 template <typename T, EnableIfFloat<T> = 0> Duration Seconds(T n);
/llvm-project-15.0.7/llvm/include/llvm/XRay/
H A DFDRRecords.h134 uint64_t Seconds = 0; variable
146 Seconds(S), Nanos(N) {} in WallclockRecord()
148 uint64_t seconds() const { return Seconds; } in seconds()

12