Updates the widget with the current SI prefixed speed.
960140
def update(self, pbar):
        ''

        if pbar.seconds_elapsed < 2e-6 or pbar.currval < 2e-6:  # =~ 0
            scaled = power = 0
        else:
            scaled, power = self._speed(pbar)

        return self.format % (scaled, self.prefixes[power], self.unit)
459927
def update(self):
        
        con = self.subpars.pars.control
        self(con.eqd1*con.tind)
764973
def update_internal(self, value):
        
        self.block()
        self.set_widget_value(value)
        self.unblock()
757068
def update(self):
        """"""
        self._controller.update(self._id, wake_if_asleep=False)
        data = self._controller.get_state_params(self._id)
        if data:
            self.__odometer = data['odometer']
        data = self._controller.get_gui_params(self._id)
        if data:
            if data['gui_distance_units'] == "mi/hr":
                self.measurement = 'LENGTH_MILES'
            else:
                self.measurement = 'LENGTH_KILOMETERS'
            self.__rated = (data['gui_range_display'] == "Rated")
813332
def update(self, data_set):
        
        now = time.time()
        for d in data_set:
            self.timed_data[d] = now
        self._expire_data()
478266
public void updateThroughput(long currentTime) {
        synchronized (throughputCalculationLock) {
            int interval = (int) (currentTime - lastThroughputCalculationTime);
            long minInterval = getThroughputCalculationIntervalInMillis();
            if (minInterval == 0 || interval < minInterval) {
                return;
            }

            long readBytes = this.readBytes.get();
            long writtenBytes = this.writtenBytes.get();
            long readMessages = this.readMessages.get();
            long writtenMessages = this.writtenMessages.get();

            readBytesThroughput = (readBytes - lastReadBytes) * 1000.0
                    / interval;
            writtenBytesThroughput = (writtenBytes - lastWrittenBytes) * 1000.0
                    / interval;
            readMessagesThroughput = (readMessages - lastReadMessages) * 1000.0
                    / interval;
            writtenMessagesThroughput = (writtenMessages - lastWrittenMessages)
                    * 1000.0 / interval;

            if (readBytesThroughput > largestReadBytesThroughput) {
                largestReadBytesThroughput = readBytesThroughput;
            }
            if (writtenBytesThroughput > largestWrittenBytesThroughput) {
                largestWrittenBytesThroughput = writtenBytesThroughput;
            }
            if (readMessagesThroughput > largestReadMessagesThroughput) {
                largestReadMessagesThroughput = readMessagesThroughput;
            }
            if (writtenMessagesThroughput > largestWrittenMessagesThroughput) {
                largestWrittenMessagesThroughput = writtenMessagesThroughput;
            }

            lastReadBytes = readBytes;
            lastWrittenBytes = writtenBytes;
            lastReadMessages = readMessages;
            lastWrittenMessages = writtenMessages;

            lastThroughputCalculationTime = currentTime;
        }
    }
477495
public void update(long throughput) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Received throughput of " + throughput + " on channel - " + this.channel.getComponentName());
        }
        this.throughput = throughput;
    }
55103
def _on_client_latency_changed(self, data):
        """"""
        self._clients.get(data.get('id')).update_latency(data)
618090
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        if self.input_method == 'local':
            # Update stats using the standard system lib
            self.uptime = datetime.now() - datetime.fromtimestamp(psutil.boot_time())

            # Convert uptime to string (because datetime is not JSONifi)
            stats = str(self.uptime).split('.')[0]
        elif self.input_method == 'snmp':
            # Update stats using SNMP
            uptime = self.get_stats_snmp(snmp_oid=snmp_oid)['_uptime']
            try:
                # In hundredths of seconds
                stats = str(timedelta(seconds=int(uptime) / 100))
            except Exception:
                pass

        # Update the stats
        self.stats = stats

        return self.stats
618086
def update(self):
        """"""
        # Init new stats
        stats = self.get_init_value()

        # IRQ plugin only available on GNU/Linux
        if not LINUX:
            return self.stats

        if self.input_method == 'local':
            # Grab the stats
            stats = self.irq.get()

        elif self.input_method == 'snmp':
            # not available
            pass

        # Get the TOP 5 (by rate/s)
        stats = sorted(stats,
                       key=operator.itemgetter('irq_rate'),
                       reverse=True)[:5]

        # Update the stats
        self.stats = stats

        return self.stats
357023
private void updateMax(int idx, long v) {
    AtomicLong current = max.getCurrent(idx);
    long m = current.get();
    while (v > m) {
      if (current.compareAndSet(m, v)) {
        break;
      }
      m = current.get();
    }
  }
767325
def update(self, pos):
        
        self.pos = pos
        self.now = time.time()
231391
def update(self):
        '''
        
        '''
        if self.hasproxy():
            irD = IRData()
            received = 0
            data = self.proxy.getIRData()

            irD.received = data.received

            self.lock.acquire()
            self.ir = irD
            self.lock.release()
563178
def update(self, pbar):
        ''
        self.n_refresh += 1
        if pbar.currval == 0:
            return 'ETA:  --:--:--'
        elif pbar.finished:
            return 'Time: %s' % self.format_time(pbar.seconds_elapsed)
        else:
            elapsed = pbar.seconds_elapsed
            try:
                speed = pbar.currval / elapsed
                if self.speed_smooth is not None:
                    self.speed_smooth = (self.speed_smooth * (1 - self.SMOOTHING)) + (speed * self.SMOOTHING)
                else:
                    self.speed_smooth = speed
                eta = float(pbar.maxval) / self.speed_smooth - elapsed + 1 if float(pbar.maxval) / self.speed_smooth - elapsed + 1 > 0 else 0

                if float(pbar.currval) / pbar.maxval > 0.30 or self.n_refresh > 10:  # ETA only rather precise if > 30% is already finished or more than 10 times updated
                    return 'ETA:  %s' % self.format_time(eta)
                if self.old_eta is not None and self.old_eta < eta:  # do not show jumping ETA if non precise mode is active
                    return 'ETA: ~%s' % self.format_time(self.old_eta)
                else:
                    self.old_eta = eta
                    return 'ETA: ~%s' % self.format_time(eta)
            except ZeroDivisionError:
                speed = 0
79346
def update(self, duration):
        """"""
        if duration >= 0:
            self.histogram.update(duration)
            self.meter.mark()
266569
def update(self):
        """"""
        if self.input_method == 'local':
            # Only refresh:
            # * if there is not other scanning thread
            # * every refresh seconds (define in the configuration file)
            if self._thread is None:
                thread_is_running = False
            else:
                thread_is_running = self._thread.isAlive()
            if self.timer_ports.finished() and not thread_is_running:
                # Run ports scanner
                self._thread = ThreadScanner(self.stats)
                self._thread.start()
                # Restart timer
                if len(self.stats) > 0:
                    self.timer_ports = Timer(self.stats[0]['refresh'])
                else:
                    self.timer_ports = Timer(0)
        else:
            # Not available in SNMP mode
            pass

        return self.stats
1224886
def update(self, milliseconds):
        """"""
        self.__sort_up()
        for obj in self.__up_objects:
            obj.update(milliseconds)