| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/abseil/ |
| H A D | duration-factory-scale.cpp | 18 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 D | duration-factory-float.cpp | 8 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 D | duration-unnecessary-conversion.cpp | 15 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 D | time-subtraction.cpp | 18 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 D | upgrade-duration-conversions.cpp | 257 (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 D | duration-subtraction.cpp | 35 #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 D | duration-addition.cpp | 48 i = absl::ToUnixMicros(t) + absl::ToInt64Microseconds(absl::Seconds(1)); in f() 79 i += absl::ToInt64Microseconds(absl::Seconds(1)); in f()
|
| H A D | time-comparison.cpp | 109 #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 D | duration-comparison.cpp | 146 #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 D | duration-unnecessary-conversion.rst | 15 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 D | duration-division.rst | 14 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 D | duration-factory-float.rst | 19 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 D | duration-factory-scale.rst | 17 absl::Duration d = absl::Seconds(60 * x); 27 // Suggested - Use absl:::Seconds instead. 28 absl::Duration d = absl::Seconds(y);
|
| H A D | duration-addition.rst | 21 int result = absl::ToUnixSeconds(t + absl::Seconds(x));
|
| /llvm-project-15.0.7/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerUtilPosix.cpp | 106 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 D | FuzzerUtilWindows.cpp | 102 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 D | FuzzerInternal.h | 55 size_t Seconds = secondsSinceProcessStartUp(); in execPerSec() local 56 return Seconds ? TotalNumberOfRuns / Seconds : 0; in execPerSec()
|
| H A D | FuzzerUtilFuchsia.cpp | 70 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 D | FuzzerLoop.cpp | 285 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 D | DurationRewriter.cpp | 54 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 D | DurationFactoryScaleCheck.cpp | 30 .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 D | Threading.cpp | 112 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 D | Timer.cpp | 169 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 D | time.h | 31 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 D | FDRRecords.h | 134 uint64_t Seconds = 0; variable 146 Seconds(S), Nanos(N) {} in WallclockRecord() 148 uint64_t seconds() const { return Seconds; } in seconds()
|