diff --git a/client/cs_prefs.cpp b/client/cs_prefs.cpp index dedbe47eee9..b266d7dece3 100644 --- a/client/cs_prefs.cpp +++ b/client/cs_prefs.cpp @@ -1,6 +1,6 @@ // This file is part of BOINC. // http://boinc.berkeley.edu -// Copyright (C) 2008 University of California +// Copyright (C) 2023 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License @@ -675,7 +675,7 @@ void CLIENT_STATE::print_global_prefs() { // msg_printf(NULL, MSG_INFO, "- When computer is in use"); msg_printf(NULL, MSG_INFO, - "- 'In use' means mouse/keyboard input in last %.1f minutes", + "- 'In use' means mouse/keyboard input in last %.2f minutes", global_prefs.idle_time_to_run ); if (!global_prefs.run_if_user_active) { @@ -736,10 +736,20 @@ void CLIENT_STATE::print_global_prefs() { ); if (global_prefs.suspend_if_no_recent_input > 0) { msg_printf(NULL, MSG_INFO, - "- Suspend if no input in last %f minutes", + "- Suspend if no input in last %.2f minutes", global_prefs.suspend_if_no_recent_input ); } + // It is possible that computing (CPU or GPU) could be suspended indefinitely if the idle time required before continuing computing + // is longer than the time required to suspend computing when the computer is idle. In this case an alert message will be sent. + // + if ((!global_prefs.run_if_user_active || !global_prefs.run_gpu_if_user_active) && (global_prefs.suspend_if_no_recent_input > 0) && + ((global_prefs.idle_time_to_run - global_prefs.suspend_if_no_recent_input) >= 0)) { + msg_printf(0, MSG_USER_ALERT, + "Preference settings don't allow computing (%.2f > %.2f). Please review.", + global_prefs.idle_time_to_run, global_prefs.suspend_if_no_recent_input + ); + } // general //