set individual time out - access limited to package Group
351263
@Override
    void set_timeout_millis(final int timeout, final boolean fwd) throws DevFailed {
	try {
	    proxy.set_timeout_millis(timeout);
	} catch (final DevFailed df) {
	    throw df;
	} catch (final Exception e) {
	    final DevError[] errors = new DevError[1];
	    errors[0] = new DevError();
	    errors[0].severity = ErrSeverity.ERR;
	    errors[0].reason = "unknown exception caught";
	    errors[0].desc = "unknown error";
	    errors[0].origin = "GroupDeviceElemnt.set_indidual_timeout_millis";
	    final DevFailed ex = new DevFailed(errors);
	    throw ex;
	}
    }
1259113
def cli(obj, environment, service, resource, event, group, tags, customer, start, duration, text, delete):
    """"""
    client = obj['client']
    if delete:
        client.delete_blackout(delete)
    else:
        if not environment:
            raise click.UsageError('Missing option "--environment" / "-E".')
        try:
            blackout = client.create_blackout(
                environment=environment,
                service=service,
                resource=resource,
                event=event,
                group=group,
                tags=tags,
                customer=customer,
                start=start,
                duration=duration,
                text=text
            )
        except Exception as e:
            click.echo('ERROR: {}'.format(e))
            sys.exit(1)
        click.echo(blackout.id)
447290
private void waitForDisabled(String distId) {
        long maxTime = 1800000; // 30 min
        long start = System.currentTimeMillis();

        boolean deployed = isDeployed(distId);
        while (!deployed) {
            if (System.currentTimeMillis() < start + maxTime) {
                sleep(10000);
                deployed = isDeployed(distId);
            } else {
                String error = "Timeout Reached waiting for distribution to " +
                               "be disabled. Please wait a few minutes and try again.";
                throw new RuntimeException(error);
            }
        }
    }
672514
def group_toggle(self, addr, use_cache=True):
        
        data = self.group_read(addr, use_cache)
        if len(data) != 1:
            problem = "Can't toggle a {}-octet group address {}".format(
                len(data), addr)
            logging.error(problem)
            raise KNXException(problem)

        if data[0] == 0:
            self.group_write(addr, [1])
        elif data[0] == 1:
            self.group_write(addr, [0])
        else:
            problem = "Can't toggle group address {} as value is {}".format(
                addr, data[0])
            logging.error(problem)
            raise KNXException(problem)
1315793
def wait(self):
        '''
        
        '''
        @param_to_property(action=["idle", "update"])
        def _wait(action, timeout=1000, package_name=None):
            if timeout / 1000 + 5 > int(os.environ.get("JSONRPC_TIMEOUT", 90)):
                http_timeout = timeout / 1000 + 5
            else:
                http_timeout = int(os.environ.get("JSONRPC_TIMEOUT", 90))
            if action == "idle":
                return self.server.jsonrpc_wrap(timeout=http_timeout).waitForIdle(timeout)
            elif action == "update":
                return self.server.jsonrpc_wrap(timeout=http_timeout).waitForWindowUpdate(package_name, timeout)
        return _wait
1322152
public void setLastAccessTime(long lastAccessTime) {
    while (true) {
      long current = this.lastAccessTime;
      if (current >= lastAccessTime) {
        break;
      }
      if (ACCESSTIME_UPDATER.compareAndSet(this, current, lastAccessTime)) {
        break;
      }
    }
  }
182730
def setageing(self, time):
        
        _runshell([brctlexe, 'setageing', self.name, str(time)],
            "Could not set ageing time in %s." % self.name)
1232302
def kpl_off(self, address, group):
        """"""
        addr = Address(address)
        device = self.plm.devices[addr.id]
        device.states[group].off()
97602
@Override
    public void setUOWTimeout(int uowType, int timeout) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "setUOWTimeout", new Object[] { Integer.valueOf(uowType), Integer.valueOf(timeout) });

        switch (uowType) {
            case UOWSynchronizationRegistry.UOW_TYPE_GLOBAL_TRANSACTION:
                try {
                    EmbeddableTransactionManagerFactory.getTransactionManager().setTransactionTimeout(timeout);
                } catch (Exception e) {
                    final IllegalArgumentException iae = new IllegalArgumentException(e);
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                        Tr.exit(tc, "setUOWTimeout", iae);
                    throw iae;
                }
                break;

            default:
                final IllegalArgumentException iae = new IllegalArgumentException("Invalid UOW type: " + uowType);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                    Tr.exit(tc, "setUOWTimeout", iae);
                throw iae;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "setUOWTimeout");
    }
542747
def timeout(self, duration=3600):
        
        self.room.check_owner()
        self.conn.make_call("timeoutFile", self.fid, duration)
938110
def kinit_timeout_handle(username, realm):
        """"""
        try:
            u = User.objects.get(username__iexact=username)
        except User.DoesNotExist:
            logger.warning("kinit timed out for {}@{} (invalid user)".format(username, realm))
            return

        logger.critical("kinit timed out for {}".format(realm), extra={
            "stack": True,
            "data": {
                "username": username
            },
            "sentry.interfaces.User": {
                "id": u.id,
                "username": username,
                "ip_address": "127.0.0.1"
            }
        })
883923
def _lock(self, timeout_ms=-1):
        """"""
        vbox = VirtualBox()
        machine = vbox.find_machine(self.machine_name)
        wait_time = 0
        while True:
            session = Session()
            try:
                machine.lock_machine(session, LockType.write)
            except Exception as exc:
                if timeout_ms != -1 and wait_time > timeout_ms:
                    raise ValueError("Failed to acquire lock - %s" % exc)
                time.sleep(1)
                wait_time += 1000
            else:
                try:
                    yield session
                finally:
                    session.unlock_machine()
                break
1194718
function SetGarbage (proxy, timeout) {
    // let's call back ourself after timeout*1000/4
    proxy.Debug (4, "SetGarbage timeout=%d", timeout);
    setTimeout (function(){SetGarbage (proxy, timeout);}, timeout*500);
    
    // let compute timeout timeout limit
    var lastshow = new Date().getTime() - (timeout *1000);
    
    for (var mmsi in proxy.vessels) {
        var vessel = proxy.vessels[mmsi];
        if (vessel.lastshow < lastshow) {
            proxy.Debug (5, "Removed Vessel mmsi=%s", mmsi);
            delete proxy.vessels [mmsi];
        }
    }
      
}
473387
def set_timeout(self, visibility_timeout, callback=None):
        
        def _set_timeout(retval):
            if retval:
              self.visibility_timeout = visibility_timeout
            if callable(callback):
                callback(retval)
        retval = self.set_attribute('VisibilityTimeout', visibility_timeout, callback=_set_timeout)
588487
private void applyConnectionManagerConfiguration(ConnectionManagerConfiguration cmc,
      org.ironjacamar.common.api.metadata.common.Timeout t)
   {
      if (t != null)
      {
         if (t.getAllocationRetry() != null)
            cmc.setAllocationRetry(t.getAllocationRetry());

         if (t.getAllocationRetryWaitMillis() != null)
            cmc.setAllocationRetryWaitMillis(t.getAllocationRetryWaitMillis());

         if (t.getXaResourceTimeout() != null)
            cmc.setXAResourceTimeout(t.getXaResourceTimeout());
      }
   }
770845
def set_muted(self, status):
        """"""
        self._group['muted'] = status
        yield from self._server.group_mute(self.identifier, status)
        _LOGGER.info('set muted to %s on %s', status, self.friendly_name)
918480
def block_here(duration=0):
    
    try:
        while not duration:
            time.sleep(0.001)

        while duration:
            time.sleep(0.001)
            duration -= 1
    except KeyboardInterrupt as err:
        raise SystemExit(1)