Avoid get same timestamps in log testcase

for arm64, userspace get time by vDSO, no syscall overhead.
multiple_test_2 sometimes get 2 same timestamps now, then testcase
fails.

Bug: b/135555666
Test: ./CtsLogdTestCases64 --gtest_filter=*multiple_test*
Merged-In: Ic8a0ab6f571df1487fe5fb4e5f07dc612af69001
Change-Id: I83f8beae168f397a347972c5e60de86d16c8f7c6
This commit is contained in:
Xu YiPing 2019-06-19 16:38:33 +08:00 committed by Tom Cherry
parent be4e6131d8
commit ac9e2af1b6
1 changed files with 1 additions and 1 deletions

View File

@ -952,7 +952,7 @@ static inline uint32_t get4LE(const char* src) {
void __android_log_btwrite_multiple__helper(int count) {
#ifdef __ANDROID__
log_time ts(CLOCK_MONOTONIC);
usleep(100);
log_time ts1(CLOCK_MONOTONIC);
// We fork to create a unique pid for the submitted log messages