Saddam icon indicating copy to clipboard operation
Saddam copied to clipboard

Division by zero

Open hub2 opened this issue 10 years ago • 1 comments

From line 124 to 130: start = time.time() while True: try: current = time.time() - start bps = (nbytes*8)/current pps = npackets/current when this chunk of code gets executed fast enough, current is 0 and python throws and exception about float division error. example Solution: setting current to non-zero value eg. 1 when it is 0

hub2 avatar Feb 28 '15 10:02 hub2

I implemented your idea in my pull request.

LandonPowell avatar Jun 12 '16 23:06 LandonPowell