Set an expire flag on key ``name`` for ``time`` milliseconds.
        ``time`` can be represented by an integer or a Python timedelta
        object.
196846
async def pexpire(self, name, time):
        
        if isinstance(time, datetime.timedelta):
            ms = int(time.microseconds / 1000)
            time = (time.seconds + time.days * 24 * 3600) * 1000 + ms
        return await self.execute_command('PEXPIRE', name, time)
1207534
def set_time(self, time):
        '''
        
        '''
        times = num2date(time[:].squeeze(), time.units)
        self.time = pd.DatetimeIndex(pd.Series(times), tz=self.location.tz)
1331626
function set(key, value /*, exflag, secs, pxflag, ms, xflag, req*/) {
  var i
    , arg
    // expiry flag: EX | PX
    , flag
    // expiry value: number
    , expiry
    // exists flag: NX | XX
    , xflag
    // request object when available
    , req;

  for(i = 0;i < arguments.length;i++) {
    arg = arguments[i];
    if(typeof arg === 'object') {
      req = arg;
    }else if(arg === Constants.NX || arg === Constants.XX) {
      xflag = arg;
    }else if(arg === Constants.EX || arg === Constants.PX) {
      flag = arg;
      expiry = arguments[++i];
    }
  }
  return this.setKey(key, value, flag, expiry, xflag, req) || null;
}
711911
def validity_duration(self):
        
        if self._proto.HasField('expireMillis'):
            return timedelta(milliseconds=self._proto.expireMillis)
        return None
611187
def expire_at(self, _time):
        
        return self._client.expireat(self.key_prefix, round(_time))
1168795
def expires_on(self):
    """"""
    timestamp = self._info.get('expirationTime', None)
    if timestamp is None:
      return None
    return _parser.Parser.parse_timestamp(timestamp)
1045177
def set(self, key, val, time=0, min_compress_len=0):
        """"""
        if not self.servers:
            return

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        val = (key, val)

        self.client.set(key=hashed_key,
                        val=val,
                        time=time,
                        min_compress_len=min_compress_len)
        self.logger("SET: %s", key)
341609
def _renew_by(name, window=None):
    '''
    
    '''
    expiry = _expires(name)
    if window is not None:
        expiry = expiry - datetime.timedelta(days=window)

    return expiry
851957
def set_cookie(response, name, value, expiry_seconds=None, secure=False):
    
    if expiry_seconds is None:
        expiry_seconds = 90 * 24 * 60 * 60  # Default to 90 days.
    expires = datetime.strftime(datetime.utcnow() +
                                timedelta(seconds=expiry_seconds),
                                "%a, %d-%b-%Y %H:%M:%S GMT")
    # Django doesn't seem to support unicode cookie keys correctly on
    # Python 2. Work around by encoding it. See
    # https://code.djangoproject.com/ticket/19802
    try:
        response.set_cookie(name, value, expires=expires, secure=secure)
    except (KeyError, TypeError):
        response.set_cookie(name.encode('utf-8'), value, expires=expires,
                            secure=secure)
840366
def set_time(self, key_name, new_time):
        """"""
        self.unbake()
        kf = self.dct[key_name]
        kf['time'] = new_time
        self.bake()
1350746
def set_lock(key, value=None, expiry_time=60):
    """"""
    from uliweb.utils.common import get_uuid

    redis = get_redis()
    value = value or get_uuid()
    return redis.set(key, value, ex=expiry_time, xx=True)
1120813
def set_(key,
         value,
         host=DEFAULT_HOST,
         port=DEFAULT_PORT,
         time=DEFAULT_TIME,
         min_compress_len=DEFAULT_MIN_COMPRESS_LEN):
    '''
    
    '''
    if not isinstance(time, six.integer_types):
        raise SaltInvocationError('\'time\' must be an integer')
    if not isinstance(min_compress_len, six.integer_types):
        raise SaltInvocationError('\'min_compress_len\' must be an integer')
    conn = _connect(host, port)
    _check_stats(conn)
    return conn.set(key, value, time, min_compress_len)
151391
def set_value(self, value, timeout):
        
        self.value = value
        self.expiration = time.perf_counter() * 1000 + timeout
607822
public void expire(long time) {
    long calculatedSize = 0;
    Iterator<Bar> it = bars.iterator();
    while (it.hasNext()) {
      long barSize = it.next().expire(time);
      if (barSize == 0) {
        it.remove();
      }
      calculatedSize += barSize;
    }
    this.size = calculatedSize;
    if (bars.isEmpty()) {
      bars.add(new Bar(barEpsilon, window));
    }
  }
620177
def pexpire(self, name, time):
        
        with self.pipe as pipe:
            return pipe.pexpire(self.redis_key(name), time)
784803
def set_time(self, time):
        '''
        
        '''
        self.length = int(time*self.sample_rate)
        return self
739679
def set(self, key, value, expire_in=None):
    
    if key not in self._keystore:
      self._keystore[key] = InMemoryItemValue(expire_in=expire_in)

    k = self._keystore[key]
    """:type k InMemoryItemValue"""
    k.update_expire_time(expire_in)
    k.value = value