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

Commit 948a8102 authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "adb: switch from system_clock to steady_clock." am: 278754ae am:...

Merge "adb: switch from system_clock to steady_clock." am: 278754ae am: f2dd09ff am: d2a00f50 am: 01c9903c
am: 698f27d3

Change-Id: I53125c67ea68fa70ebfa6854928cfa58f1c54815
parents 79aa9900 698f27d3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -324,7 +324,7 @@ static int usb_bulk_write(usb_handle* h, const void* data, int len) {


    h->urb_out_busy = true;
    h->urb_out_busy = true;
    while (true) {
    while (true) {
        auto now = std::chrono::system_clock::now();
        auto now = std::chrono::steady_clock::now();
        if (h->cv.wait_until(lock, now + 5s) == std::cv_status::timeout || h->dead) {
        if (h->cv.wait_until(lock, now + 5s) == std::cv_status::timeout || h->dead) {
            // TODO: call USBDEVFS_DISCARDURB?
            // TODO: call USBDEVFS_DISCARDURB?
            errno = ETIMEDOUT;
            errno = ETIMEDOUT;