using timeval instead of cycles to calculate bandwidth