commit
01813997a3
17
pom.xml
17
pom.xml
|
@ -18,20 +18,19 @@
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
|
||||||
<logback.version>1.2.7</logback.version>
|
<logback.version>1.2.10</logback.version>
|
||||||
<forms_rt.version>7.0.3</forms_rt.version>
|
<forms_rt.version>7.0.3</forms_rt.version>
|
||||||
<AppleJavaExtensions.version>1.4</AppleJavaExtensions.version>
|
|
||||||
<lombok.version>1.18.22</lombok.version>
|
<lombok.version>1.18.22</lombok.version>
|
||||||
<junit-jupiter-api.version>5.8.1</junit-jupiter-api.version>
|
<junit-jupiter-api.version>5.8.2</junit-jupiter-api.version>
|
||||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||||
<guava.version>31.0.1-jre</guava.version>
|
<guava.version>31.0.1-jre</guava.version>
|
||||||
<okhttp.version>4.9.3</okhttp.version>
|
<okhttp.version>4.9.3</okhttp.version>
|
||||||
<flatlaf.version>2.0.1</flatlaf.version>
|
<flatlaf.version>2.0.1</flatlaf.version>
|
||||||
<flatlaf-extras.version>2.0.1</flatlaf-extras.version>
|
<flatlaf-extras.version>2.0.1</flatlaf-extras.version>
|
||||||
<flatlaf-intellij-themes.version>2.0.1</flatlaf-intellij-themes.version>
|
<flatlaf-intellij-themes.version>2.0.1</flatlaf-intellij-themes.version>
|
||||||
<hutool-all.version>5.7.16</hutool-all.version>
|
<hutool-all.version>5.7.21</hutool-all.version>
|
||||||
<fastjson.version>1.2.78</fastjson.version>
|
<fastjson.version>1.2.79</fastjson.version>
|
||||||
<oshi-core.version>6.1.2</oshi-core.version>
|
<oshi-core.version>6.1.3</oshi-core.version>
|
||||||
<jfreechart.version>1.5.3</jfreechart.version>
|
<jfreechart.version>1.5.3</jfreechart.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -56,12 +55,6 @@
|
||||||
<version>${forms_rt.version}</version>
|
<version>${forms_rt.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.apple</groupId>
|
|
||||||
<artifactId>AppleJavaExtensions</artifactId>
|
|
||||||
<version>${AppleJavaExtensions.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
|
|
@ -297,6 +297,7 @@ public class CpuForm {
|
||||||
CentralProcessor processor = App.si.getHardware().getProcessor();
|
CentralProcessor processor = App.si.getHardware().getProcessor();
|
||||||
|
|
||||||
long[] currentFreq = processor.getCurrentFreq();
|
long[] currentFreq = processor.getCurrentFreq();
|
||||||
|
BigDecimal totalFreq = BigDecimal.ZERO;
|
||||||
|
|
||||||
for (int i = 0; i < currentFreq.length; i++) {
|
for (int i = 0; i < currentFreq.length; i++) {
|
||||||
|
|
||||||
|
@ -305,9 +306,10 @@ public class CpuForm {
|
||||||
String freqStr = divide + " GHz";
|
String freqStr = divide + " GHz";
|
||||||
textField.setText(freqStr);
|
textField.setText(freqStr);
|
||||||
|
|
||||||
// TODO to fix
|
totalFreq = divide.add(totalFreq);
|
||||||
cpuForm.getFreqLabel().setText(freqStr);
|
|
||||||
}
|
}
|
||||||
|
cpuForm.getFreqLabel().setText(String.valueOf(totalFreq.divide(new BigDecimal(currentFreq.length), 2, RoundingMode.HALF_UP)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue