parameters: (self)
docstring: Read the contents of the memory-mapped file and update the ui if
      necessary.  If the same counters are present in the file as before
      we just update the existing labels.  If any counters have been added
      or removed we scrap the existing ui and draw a new one.
docstring_summary: Read the contents of the memory-mapped file and update the ui if
      necessary.  If the same counters are present in the file as before
      we just update the existing labels.  If any counters have been added
      or removed we scrap the existing ui and draw a new one.
docstring_tokens: Read the contents of the memory - mapped file and update the ui if necessary . If the same counters are present in the file as before we just update the existing labels . If any counters have been added or removed we scrap the existing ui and draw a new one .
function: def UpdateCounters(self):
      """Read the contents of the memory-mapped file and update the ui if
      necessary.  If the same counters are present in the file as before
      we just update the existing labels.  If any counters have been added
      or removed we scrap the existing ui and draw a new one.
      """
      changed = False
      counters_in_use = self.data.CountersInUse()
      if counters_in_use != len(self.ui_counters):
        self.RefreshCounters()
        changed = True
      else:
        for i in range(self.data.CountersInUse()):
          counter = self.data.Counter(i)
          name = counter.Name()
          if name in self.ui_counters:
            value = counter.Value()
            ui_counter = self.ui_counters[name]
            counter_changed = ui_counter.Set(value)
            changed = (changed or counter_changed)
          else:
            self.RefreshCounters()
            changed = True
            break
      if changed:
        # The title of the window shows the last time the file was
        # changed.
        self.UpdateTime()
      self.ScheduleUpdate()
function_tokens: def UpdateCounters ( self ) : changed = False counters_in_use = self . data . CountersInUse ( ) if counters_in_use != len ( self . ui_counters ) : self . RefreshCounters ( ) changed = True else : for i in range ( self . data . CountersInUse ( ) ) : counter = self . data . Counter ( i ) name = counter . Name ( ) if name in self . ui_counters : value = counter . Value ( ) ui_counter = self . ui_counters [ name ] counter_changed = ui_counter . Set ( value ) changed = ( changed or counter_changed ) else : self . RefreshCounters ( ) changed = True break if changed : # The title of the window shows the last time the file was # changed. self . UpdateTime ( ) self . ScheduleUpdate ( )