From bd3fc92634c7e0cc4ee778a2039e8a0e1f44a3a8 Mon Sep 17 00:00:00 2001 From: Bryan Stenson Date: Fri, 10 Sep 2021 11:49:22 +0200 Subject: [PATCH] Ref: ensure comment matches reality --- src/com/sheepit/client/os/Linux.java | 2 +- src/com/sheepit/client/os/Mac.java | 2 +- src/com/sheepit/client/os/OS.java | 3 +++ src/com/sheepit/client/os/Windows.java | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/sheepit/client/os/Linux.java b/src/com/sheepit/client/os/Linux.java index 2e2be97..85703e9 100644 --- a/src/com/sheepit/client/os/Linux.java +++ b/src/com/sheepit/client/os/Linux.java @@ -183,7 +183,7 @@ public class Linux extends OS { @Override public void shutdownComputer(int delayInMinutes) { try { - // Shutdown the computer waiting 1 minute to allow all SheepIt threads to close and exit the app + // Shutdown the computer waiting delayInMinutes minutes to allow all SheepIt threads to close and exit the app ProcessBuilder builder = new ProcessBuilder("shutdown", "-h", String.valueOf(delayInMinutes)); Process process = builder.inheritIO().start(); } diff --git a/src/com/sheepit/client/os/Mac.java b/src/com/sheepit/client/os/Mac.java index 0149d9c..2993ff0 100644 --- a/src/com/sheepit/client/os/Mac.java +++ b/src/com/sheepit/client/os/Mac.java @@ -126,7 +126,7 @@ public class Mac extends OS { @Override public void shutdownComputer(int delayInMinutes) { try { - // Shutdown the computer waiting 1 minute to allow all SheepIt threads to close and exit the app + // Shutdown the computer waiting delayInMinutes minutes to allow all SheepIt threads to close and exit the app ProcessBuilder builder = new ProcessBuilder("shutdown", "-h", String.valueOf(delayInMinutes)); Process process = builder.inheritIO().start(); } diff --git a/src/com/sheepit/client/os/OS.java b/src/com/sheepit/client/os/OS.java index c60bba8..650796e 100644 --- a/src/com/sheepit/client/os/OS.java +++ b/src/com/sheepit/client/os/OS.java @@ -66,6 +66,9 @@ public abstract class OS { public abstract boolean checkNiceAvailability(); + /** + * Shutdown the computer waiting delayInMinutes minutes to allow all SheepIt threads to close and exit the app + */ public abstract void shutdownComputer(int delayInMinutes); public CPU getCPU() { diff --git a/src/com/sheepit/client/os/Windows.java b/src/com/sheepit/client/os/Windows.java index 5393559..f29ce49 100644 --- a/src/com/sheepit/client/os/Windows.java +++ b/src/com/sheepit/client/os/Windows.java @@ -158,7 +158,7 @@ public class Windows extends OS { @Override public void shutdownComputer(int delayInMinutes) { try { - // Shutdown the computer, waiting 60 seconds, force app closure and on the shutdown screen indicate that was initiated by SheepIt app + // Shutdown the computer, waiting delayInMinutes minutes, force app closure and on the shutdown screen indicate that was initiated by SheepIt app ProcessBuilder builder = new ProcessBuilder("shutdown", "/s", "/f", "/t", String.valueOf(delayInMinutes * 60), "/c", "\"SheepIt App has initiated this computer shutdown.\""); Process process = builder.inheritIO().start(); }