VirtualBox

Changeset 22914 in vbox


Ignore:
Timestamp:
Sep 10, 2009 1:04:42 PM (15 years ago)
Author:
vboxsync
Message:

VBoxManage: use (hopefully) monotonic, not wall time source when waiting for timeouts (btw, there are some other places like this)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r22913 r22914  
    459459    }
    460460    a->virtualBox->RegisterCallback(callback);
    461     RTTIMESPEC tmStarted, tmNow;
    462     RTTimeNow (&tmStarted);
     461    uint64_t u64Started = RTTimeMilliTS();
    463462    do {
    464463      int vrc = com::EventQueue::getMainEventQueue()->processEventQueue(300);
     
    468467          return 1;
    469468      }
    470       if (cMsTimeout != RT_INDEFINITE_WAIT)
    471       {
    472         RTTimeNow(&tmNow);
    473         RTTimeSpecSub(&tmNow, &tmStarted);
    474         if (RTTimeSpecGetMilli(&tmNow) >= cMsTimeout)
     469      if (cMsTimeout != RT_INDEFINITE_WAIT &&
     470          RTTimeMilliTS() - u64Started >= cMsTimeout)
    475471            break;
    476       }
    477472    } while  (!cbImpl->Signalled());
    478473
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette