ArchiveTeam / seesaw-kit

Making a reusable toolkit for writing seesaw scripts
Other
69 stars 30 forks source link

Potential division by zero error in BandwidthMonitor #31

Closed chfoo closed 10 years ago

chfoo commented 11 years ago

On warrior.py Line 107,

      time_delta = cur_time - self.prev_time
      self.bandwidth = [
        (cur_stats[0] - self.prev_stats[0]) / time_delta,
        (cur_stats[1] - self.prev_stats[1]) / time_delta,
      ]

a divide by zero error can potentially occur.