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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user