# HG changeset patch # User Ludovic Chabant # Date 1434867831 25200 # Node ID eef887cec7762fd0793fe5f290d14ea999102d6a # Parent ff6cc43fb40cf63f61648d267ed18c20de3ef4f3 internal: Add utility function for incrementing performance timers. diff -r ff6cc43fb40c -r eef887cec776 piecrust/environment.py --- 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)