VirtualBox

Changeset 22913 in vbox


Ignore:
Timestamp:
Sep 10, 2009 12:46:36 PM (15 years ago)
Author:
vboxsync
Message:

VBoxManage: event wait timeout

File:
1 edited

Legend:

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

    r22911 r22913  
    459459    }
    460460    a->virtualBox->RegisterCallback(callback);
    461 
     461    RTTIMESPEC tmStarted, tmNow;
     462    RTTimeNow (&tmStarted);
    462463    do {
    463       int vrc = com::EventQueue::getMainEventQueue()->processEventQueue(1000);
     464      int vrc = com::EventQueue::getMainEventQueue()->processEventQueue(300);
    464465      if (RT_FAILURE(vrc) && vrc != VERR_TIMEOUT)
    465466      {
    466467          RTPrintf("Error waiting for event: %Rrc\n", vrc);
    467468          return 1;
     469      }
     470      if (cMsTimeout != RT_INDEFINITE_WAIT)
     471      {
     472        RTTimeNow(&tmNow);
     473        RTTimeSpecSub(&tmNow, &tmStarted);
     474        if (RTTimeSpecGetMilli(&tmNow) >= cMsTimeout)
     475            break;
    468476      }
    469477    } while  (!cbImpl->Signalled());
     
    509517    return errorSyntax(USAGE_GUESTPROPERTY, "Incorrect parameters");
    510518}
    511 
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