From 8e664fdfcdace5855bd26facbd010d91f30ca3c3 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 30 Apr 2016 15:48:43 -0700 Subject: [PATCH] timing.py: record finish(when) correctly --- src/wormhole/timing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wormhole/timing.py b/src/wormhole/timing.py index e4f884d..1d7ace5 100644 --- a/src/wormhole/timing.py +++ b/src/wormhole/timing.py @@ -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)