Return the number of counters in active use.
(self)
| 437 | self.counter_names_offset + self.max_counters * self._COUNTER_NAME_SIZE |
| 438 | |
| 439 | def CountersInUse(self): |
| 440 | """Return the number of counters in active use.""" |
| 441 | for i in range(self.max_counters): |
| 442 | name_offset = self.counter_names_offset + i * self._COUNTER_NAME_SIZE |
| 443 | if self.data.ByteAt(name_offset) == 0: |
| 444 | return i |
| 445 | return self.max_counters |
| 446 | |
| 447 | def Counter(self, i): |
| 448 | """Return the i'th counter.""" |