Revert "[res] Better modification time resolution in Idmap"
This reverts commit fff1d48f432741160019a9266728097f10bd2189.
Reason for revert: <Potential culprit for b/365676142 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>
Change-Id: I6b0a0bd67a14e4738a8cd64be2214840d02eee3f
diff --git a/libs/androidfw/tests/Idmap_test.cpp b/libs/androidfw/tests/Idmap_test.cpp
index cb2e56f..60aa7d8 100644
--- a/libs/androidfw/tests/Idmap_test.cpp
+++ b/libs/androidfw/tests/Idmap_test.cpp
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-#include <chrono>
-#include <thread>
-
#include "android-base/file.h"
#include "androidfw/ApkAssets.h"
#include "androidfw/AssetManager2.h"
@@ -30,7 +27,6 @@
#include "data/overlayable/R.h"
#include "data/system/R.h"
-using namespace std::chrono_literals;
using ::testing::NotNull;
namespace overlay = com::android::overlay;
@@ -222,13 +218,10 @@
unlink(temp_file.path);
ASSERT_FALSE(apk_assets->IsUpToDate());
-
- const auto sleep_duration =
- std::chrono::nanoseconds(std::max(kModDateResolutionNs, 1'000'000ull));
- std::this_thread::sleep_for(sleep_duration);
+ sleep(2);
base::WriteStringToFile("hello", temp_file.path);
- std::this_thread::sleep_for(sleep_duration);
+ sleep(2);
ASSERT_FALSE(apk_assets->IsUpToDate());
}