Stupid else ifs
This commit is contained in:
parent
a64e082f2c
commit
34ce818614
@ -88,17 +88,17 @@ public class UtilTime
|
||||
if (trim == 0)
|
||||
{
|
||||
if (type == TimeUnit.DAYS) text = (num = UtilMath.trim(trim, time)/86400000d) + " Day";
|
||||
if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time)/3600000d) + " Hour";
|
||||
if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time)/60000d) + " Minute";
|
||||
if (type == TimeUnit.SECONDS) text = (num = (int)UtilMath.trim(trim, time/1000d)) + " Second";
|
||||
else if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time)/3600000d) + " Hour";
|
||||
else if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time)/60000d) + " Minute";
|
||||
else if (type == TimeUnit.SECONDS) text = (num = (int)UtilMath.trim(trim, time/1000d)) + " Second";
|
||||
else text = (num = (int)UtilMath.trim(trim, time)) + " Millisecond";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == TimeUnit.DAYS) text = (num = UtilMath.trim(trim, time/86400000d)) + " Day";
|
||||
if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time/3600000d)) + " Hour";
|
||||
if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time/60000d)) + " Minute";
|
||||
if (type == TimeUnit.SECONDS) text = (num = UtilMath.trim(trim, time/1000d)) + " Second";
|
||||
else if (type == TimeUnit.HOURS) text = (num = UtilMath.trim(trim, time/3600000d)) + " Hour";
|
||||
else if (type == TimeUnit.MINUTES) text = (num = UtilMath.trim(trim, time/60000d)) + " Minute";
|
||||
else if (type == TimeUnit.SECONDS) text = (num = UtilMath.trim(trim, time/1000d)) + " Second";
|
||||
else text = (num = UtilMath.trim(trim, time)) + " Millisecond";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user