TimeDelta factory function migration.
To aid conversions, first removed "using base::TimeDelta;" and converted
TimeDelta to base::TimeDelta in the affected files. Then converted all
TimeDelta::FromX() and TimeDelta().FromX() (!) into X().
The changes in this CL were all performed by tools; no manual
interventions occurred.
Bug: 1243777
Change-Id: Iddcb80d7883fd494d2209d01945a6553f316ff95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3202380
Commit-Queue: Peter Kasting <[email protected]>
Owners-Override: Peter Kasting <[email protected]>
Reviewed-by: Peter Boström <[email protected]>
Cr-Commit-Position: refs/heads/main@{#928323}
diff --git a/base/no_destructor_unittest.cc b/base/no_destructor_unittest.cc
index ebe19be2..525add4 100644
--- a/base/no_destructor_unittest.cc
+++ b/base/no_destructor_unittest.cc
@@ -193,7 +193,7 @@
background_getter.Start();
while (!BlockingConstructor::WasConstructorCalled())
- PlatformThread::Sleep(TimeDelta::FromMilliseconds(1));
+ PlatformThread::Sleep(Milliseconds(1));
// Spin 4 foreground thread per core contending to get the already under
// construction NoDestructor. When they are all running and poking at it :
@@ -218,7 +218,7 @@
// Fail if this test takes more than 5 seconds (it takes 5-10 seconds on a
// Z840 without r527445 but is expected to be fast (~30ms) with the fix).
- EXPECT_LT(TimeTicks::Now() - test_begin, TimeDelta::FromSeconds(5));
+ EXPECT_LT(TimeTicks::Now() - test_begin, Seconds(5));
}
} // namespace base