Fixed overflow problem when calculating monthly usage. It now works well (without

getting too wide for the window) up to 1 Tbps.
This commit is contained in:
mathiasdm
2009-04-07 20:09:59 +00:00
parent bf50695c93
commit 85e5013dbd

View File

@ -23,6 +23,6 @@ public class SpeedHelper {
}
public static int calculateMonthlyUsage(int kbytes) {
return (kbytes*3600*24*31)/1000000;
return (int) ((((long)kbytes)*3600*24*31)/1000000);
}
}