Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 998fca57 authored by Xu YiPing's avatar Xu YiPing
Browse files

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*
parent 4a8d436a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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