long startTime = System.currentTimeMillis(); // 开始下载时获取开始时间 long curTime = System.currentTimeMillis(); int usedTime = (int) ((curTime-startTime)/1000); if(usedTime==0)usedTime = 1; int downloadSpeed = (downloadSize/usedTime)/1024; // 下载速度