有没有办法使用JavaScript计算int total = 0;
int val = 0;
monthly_rent_et.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
System.out.println("Calc "+Integer.valueOf(monthly_rent_et.getText().toString()));
val = val + total+Integer.valueOf(monthly_rent_et.getText().toString());
total_et.setText(String.valueOf(val));
}
}
});
water_et.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!hasFocus) {
System.out.println("Calc "+Integer.valueOf(water_et.getText().toString()));
val = val + total+Integer.valueOf(water_et.getText().toString());
total_et.setText(String.valueOf(val));
}
}
});
和Jitter
?
如果无法做到这一点(我们有Packet Loss
),有没有办法用Latency
(Ping时间)计算Jitter
和Packet Loss
?如果是,那么公式是什么?