diff options
Diffstat (limited to 'tftpy/TftpStates.py')
-rw-r--r-- | tftpy/TftpStates.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py index 89d512f..8dacff0 100644 --- a/tftpy/TftpStates.py +++ b/tftpy/TftpStates.py @@ -30,6 +30,8 @@ class TftpMetrics(object): def compute(self): # Compute transfer time self.duration = self.end_time - self.start_time + if self.duration == 0: + self.duration = 1 log.debug("TftpMetrics.compute: duration is %s" % self.duration) self.bps = (self.bytes * 8.0) / self.duration self.kbps = self.bps / 1024.0 |