Newspaper пре 1 година
родитељ
комит
42ef4763ef
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      snowy-web-app/src/main/java/vip/xiaonuo/Timer/DeviceOnlineTimer.java

+ 1 - 1
snowy-web-app/src/main/java/vip/xiaonuo/Timer/DeviceOnlineTimer.java

@@ -38,7 +38,7 @@ public class DeviceOnlineTimer implements CommonTimerTaskRunner {
             Integer total = deviceOff+deviceOn;
             LocalDateTime now = LocalDateTime.now();
             try {
-                rate = (deviceOn/total)*100;
+                rate = ((float)deviceOn/(float)total)*100;
             }catch (ArithmeticException e){
                 System.out.println(e);
             }