(self, text='Timer')
| 81 | self.last_time = now |
| 82 | |
| 83 | def print(self, text='Timer'): |
| 84 | total = 0. |
| 85 | print('[{}]'.format(text), end=' ') |
| 86 | for key in self.times: |
| 87 | val = self.times[key] |
| 88 | if self.will_print[key]: |
| 89 | print('%s=%.3f' % (key, val), end=' ') |
| 90 | total += val |
| 91 | print('total=%.3f sec {%.1f FPS}' % (total, 1./total), end=' ') |
| 92 | if self.newline: |
| 93 | print(flush=True) |
| 94 | else: |
| 95 | print(end='\r', flush=True) |
| 96 | self.reset() |
| 97 | |
| 98 | |
| 99 | class VideoStreamer: |
no test coverage detected