Start a new phase, and terminate the current one, if one is ongoing.
(self, name: str, tokens: int = 0)
| 48 | self.phases.append(stats) |
| 49 | |
| 50 | def phase(self, name: str, tokens: int = 0): |
| 51 | """ |
| 52 | Start a new phase, and terminate the current one, |
| 53 | if one is ongoing. |
| 54 | """ |
| 55 | now = time.time() |
| 56 | self.end_phase(tokens, now) |
| 57 | self.current = (name, tokens, now) |