From e3aaa887c53582dd9fadde783173bc54f935c4dd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 17 Sep 2018 14:15:19 -0600 Subject: [PATCH] Countdown the minutes remaining during Prime95 * Fixes issue #54 --- .bin/Scripts/functions/hw_diags.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index 61530e5b..3b8bd354 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -452,7 +452,6 @@ def run_iobenchmark(): def run_mprime(): """Run Prime95 for MPRIME_LIMIT minutes while showing the temps.""" aborted = False - clear_screen() print_log('\nStart Prime95 test') TESTS['Prime95']['Status'] = 'Working' update_progress() @@ -467,12 +466,15 @@ def run_mprime(): # Start test run_program(['apple-fans', 'max']) - print_standard('Running Prime95 for {} minutes'.format(MPRIME_LIMIT)) - print_warning('If running too hot, press CTL+c to abort the test') try: - sleep(int(MPRIME_LIMIT)*60) + for i in range(int(MPRIME_LIMIT)): + clear_screen() + print_standard('Running Prime95 ({} minutes left)'.format( + int(MPRIME_LIMIT)-i)) + print_warning('If running too hot, press CTRL+c to abort the test') + sleep(60) except KeyboardInterrupt: - # Catch CTL+C + # Catch CTRL+C aborted = True # Save "final" temps