Sets this record's TTL and created time to that of
        another record.
189696
def reset_ttl(self, other):
        """"""
        self.created = other.created
        self.ttl = other.ttl
875107
def set(self, time):
        
        self._time = time
        self._pb.sec = int(self._time)
        self._pb.nsec = int((self._time - self._pb.sec) * 10 ** 9)
721905
def set_ttl(self, key, ttl):
        
        return self._client.expire(self.get_key(key), ttl)
241790
def update_ttl(self, ttl):
        """"""

        if len(self) == 0:
            self.ttl = ttl
        elif ttl < self.ttl:
            self.ttl = ttl
584756
public function set($key, $value, $ttl = null)
    {
        $values = $this->readFileContents();

        $values[$key] = [];

        $values[$key][self::VALUE] = $value;
        $values[$key][self::TTL] = $ttl;
        $values[$key][self::CREATE_TIME] = time();

        return $this->writeFileContents($values);
    }
151391
def set_value(self, value, timeout):
        
        self.value = value
        self.expiration = time.perf_counter() * 1000 + timeout
826240
public function do_set($key, $value, $ttl)
    {
        $context = $this->_context;

        $context->data[$key] = ['deadline' => time() + $ttl, 'data' => $value];
    }
662608
def set(self, time_sec, callback_fn, *args, **kwdargs):
        
        timer = self.timer()
        timer.set_callback('expired', callback_fn, *args, **kwdargs)
        timer.set(time_sec)
        return timer
840366
def set_time(self, key_name, new_time):
        """"""
        self.unbake()
        kf = self.dct[key_name]
        kf['time'] = new_time
        self.bake()
557613
def setcreated(self, dt=None):
        
        if dt is None:
            self.created = Token.utc()
        else:
            self.created = dt
767917
private void addTimeToReport() {
        // record the time
        SimpleDateFormat stf = new SimpleDateFormat("HH:mm:ss");
        String timeNow = stf.format(new Date());
        long totalTime = (new Date()).getTime() - startTime;
        long time = totalTime / 1000;
        StringBuilder seconds = new StringBuilder(Integer.toString((int) (time % 60)));
        StringBuilder minutes = new StringBuilder(Integer.toString((int) ((time % 3600) / 60)));
        StringBuilder hours = new StringBuilder(Integer.toString((int) (time / 3600)));
        for (int i = 0; i < 2; i++) {
            if (seconds.length() < 2) {
                seconds.insert(0, "0");
            }
            if (minutes.length() < 2) {
                minutes.insert(0, "0");
            }
            if (hours.length() < 2) {
                hours.insert(0, "0");
            }
        }
        replaceInFile("RUNTIME", hours + ":" + minutes + ":" + seconds);
        replaceInFile("TIMEFINISHED", timeNow);
    }
1356939
def reload(self):
        """"""
        if time.time() - self.updated > self.ttl:
            self.force_reload()
672766
def set_record(self, name, record_id, record):
        
        if name not in self._cache:
            self._cache[name] = {}
        self._cache[name][record_id] = record
784803
def set_time(self, time):
        '''
        
        '''
        self.length = int(time*self.sample_rate)
        return self
654531
def initial_update(self, mapping):
        '''
        '''
        for key, val in mapping.items():
            _, timestamp = val
            if not self.TTL or (datetime.utcnow() -
                datetime.utcfromtimestamp(timestamp) < self.TTL):
                self.__setitem__(key, val, raw=True)
1241137
def _update_record(self, record_id, name, address, ttl):
        """"""
        data = json.dumps({'record': {'name': name,
                                      'content': address,
                                      'ttl': ttl}})
        headers = {'Content-Type': 'application/json'}
        request = self._session.put(self._baseurl + '/%d' % record_id,
                                    data=data, headers=headers)
        if not request.ok:
            raise RuntimeError('Failed to update record: %s - %s' %
                               (self._format_hostname(name), request.json()))
        record = request.json()
        if 'record' not in record or 'id' not in record['record']:
            raise RuntimeError('Invalid record JSON format: %s - %s' %
                               (self._format_hostname(name), request.json()))
        return record['record']
557602
public function set($name, $var, $ttl = 0, callable $expireCheck = null)
    {
        $res = $this->impl->save($name, serialize(array(
            $var,
            $ttl,
            $expireCheck,
            time(),
        )), is_null($expireCheck) ? $ttl : 0);
        return $res;
    }