def _measurement_progress_cb(self, sender, vals): running = time.time() - self._measurement_start if vals['current'] > 0: predicted = running / vals['current'] * vals['total'] - running else: predicted = 0 text = _L('Step %d / %d, running: %s, remaining: %s') % \ (vals['current'], vals['total'], misc.seconds_to_str(running), \ misc.seconds_to_str(predicted)) self._status_label.set_text(text)
def _measurement_finished_cb(self, sender): logging.debug('Measurement finished') self.set_sensitive(True) runtime = time.time() - self._measurement_start self._status_label.set_text(_L('Finished in %s') % \ misc.seconds_to_str(runtime))
def _measurement_finished_cb(self, sender, msg): logging.debug('Measurement finished: %s', msg) self.set_sensitive(True) if self._plot is not None: self._plot.save_png() runtime = time.time() - self._measurement_start self._status_label.set_text(_L('Finished in %s') % \ misc.seconds_to_str(runtime))