timing.py: record finish(when) correctly

This commit is contained in:
Brian Warner 2016-04-30 15:48:43 -07:00
parent 37ecaebd3e
commit 8e664fdfcd

View File

@ -16,8 +16,8 @@ class Event:
def detail(self, **details):
self._details.update(details)
def finish(self, server_sent=None, **details):
self._stop = time.time()
def finish(self, when=None, server_sent=None, **details):
self._stop = time.time() if when is None else float(when)
if server_sent:
self.server_sent(server_sent)
self.detail(**details)