Skip to content

Commit b84c9ef

Browse files
committed
refactor: remove unneeded field
1 parent 48ab076 commit b84c9ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/src/main/java/net/laprun/sustainability/power/sensors/macos/powermetrics/NuProcessWrapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public class NuProcessWrapper implements ProcessWrapper {
1010
private final PowermetricsProcessHandler metadataHandler;
1111
private PowermetricsProcessHandler measureHandler;
1212
private String periodInMilliSecondsAsString;
13-
private long periodInMilliSeconds;
1413

1514
public NuProcessWrapper() {
1615
metadataHandler = new PowermetricsProcessHandler("cpu_power", "-i", "10", "-n", "1");
@@ -35,8 +34,8 @@ public InputStream streamForMetadata() {
3534
@Override
3635
public void start(long periodInMilliSeconds) {
3736
// todo? check if asked period is the same as the current used one
38-
this.periodInMilliSeconds = periodInMilliSeconds > 100 ? periodInMilliSeconds - 50 : periodInMilliSeconds;
39-
this.periodInMilliSecondsAsString = Long.toString(this.periodInMilliSeconds);
37+
periodInMilliSeconds = periodInMilliSeconds > 100 ? periodInMilliSeconds - 50 : periodInMilliSeconds;
38+
this.periodInMilliSecondsAsString = Long.toString(periodInMilliSeconds);
4039
}
4140

4241
@Override

0 commit comments

Comments
 (0)