(interval)
return (tot_before, tot_after, pnic_before, pnic_after)
Retrieve raw stats within an interval window.
Retrieve raw stats within an interval window.
Retrieve raw stats within an interval window .
def poll(interval):
    """Retrieve raw stats within an interval window."""
    tot_before = psutil.net_io_counters()
    pnic_before = psutil.net_io_counters(pernic=True)
    # sleep some time
    time.sleep(interval)
    tot_after = psutil.net_io_counters()
    pnic_after = psutil.net_io_counters(pernic=True)
    return (tot_before, tot_after, pnic_before, pnic_after)
def poll ( interval ) : tot_before = psutil . net_io_counters ( ) pnic_before = psutil . net_io_counters ( pernic = True ) # sleep some time time . sleep ( interval ) tot_after = psutil . net_io_counters ( ) pnic_after = psutil . net_io_counters ( pernic = True ) return ( tot_before , tot_after , pnic_before , pnic_after )