Skip to content

Commit

Permalink
Fix divide-by-zero error if we get an old or repeat procmon packet.
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Oct 7, 2023
1 parent bf7d361 commit 9fcd739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pycbsdk/cbhw/device/nsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def _handle_nplay(self, pkt):
self._config["nplay"] = pkt

def _handle_procmon(self, pkt):
update_interval = pkt.header.time - self._monitor_state["time"]
update_interval = max(pkt.header.time - self._monitor_state["time"], 1)
pkt_delta = self.pkts_received - self._monitor_state["pkts_received"]

v_int = [int(_) for _ in self._params.protocol.split(".")]
Expand Down

0 comments on commit 9fcd739

Please sign in to comment.