Casting math operands before assignment

This commit is contained in:
ayman abdelghany 2016-02-11 20:04:45 +02:00
parent 3f0214a8e3
commit 9768188eb2

View File

@ -15,13 +15,13 @@ public class Sleep {
Thread.sleep(num);
return;
case SEC:
Thread.sleep(num*1000);
Thread.sleep(num*1000L);
return;
case MIN:
Thread.sleep(num*60*1000);
Thread.sleep(num*60*1000L);
return;
case HOUR:
Thread.sleep(num*60*60*1000);
Thread.sleep(num*60*60*1000L);
return;
default:
logger.error("输入类型错误应为MSEC,SEC,MIN,HOUR之一");