add calculating packet delay method