(self, name='')
| 80 | self.max = v |
| 81 | |
| 82 | def checkpoint(self, name=''): |
| 83 | span = self.elapsed |
| 84 | self.__update_stat(span) |
| 85 | text = 'Stopwatch("{tname}") - {checkpoint} - {last:.6f}ms ({elapsed:.12f}ms elapsed)'.format( |
| 86 | tname=self.name, |
| 87 | checkpoint=str(name, "utf-8"), |
| 88 | last=self.last, |
| 89 | elapsed=span |
| 90 | ).strip() |
| 91 | self.__last = Stopwatch._tfunc() |
| 92 | if self.logger: |
| 93 | self.logger.debug(text) |
| 94 | else: |
| 95 | print(text) |
| 96 | |
| 97 | @staticmethod |
| 98 | def CpuClock(): |