Mercurial > piecrust2
diff piecrust/environment.py @ 417:eef887cec776
internal: Add utility function for incrementing performance timers.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 20 Jun 2015 23:23:51 -0700 |
parents | ff6cc43fb40c |
children | 3b658190c02b |
line wrap: on
line diff
--- a/piecrust/environment.py Sat Jun 20 21:05:25 2015 -0700 +++ b/piecrust/environment.py Sat Jun 20 23:23:51 2015 -0700 @@ -83,6 +83,9 @@ def stepTimer(self, category, value): self._timers[category] += value + def stepTimerSince(self, category, since): + self.stepTimer(category, time.perf_counter() - since) + def _onSubCacheDirChanged(self, app): for name, repo in self.fs_caches.items(): cache = app.cache.getCache(name)