diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/sleep_time_check | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/sleep_time_check b/bin/sleep_time_check index 87fce153..9e7f0841 100755 --- a/bin/sleep_time_check +++ b/bin/sleep_time_check @@ -33,7 +33,7 @@ def main(): lines = file.readlines() except IOError as e: print(e) - return False + return 1 sleep_time = None sleep_times = [] @@ -51,23 +51,23 @@ def main(): if (sleep_time is None or resume_time is None) or \ (len(sleep_times) != len(resume_times)): print("ERROR: One or more times was not reported correctly") - return False + return 1 print("Average time to enter sleep state: %.4f seconds" % mean(sleep_times)) print("Average time to resume from sleep state: %.4f seconds" % mean(resume_times)) - failed = False + failed = 0 if sleep_time > args.sleep_threshold: print("System failed to suspend in less than %s seconds" % args.sleep_threshold) - failed = True + failed = 1 if resume_time > args.resume_threshold: print("System failed to resume in less than %s seconds" % args.resume_threshold) - failed = True + failed = 1 if sleep_time <= 0.00 or resume_time <= 0.00: print("ERROR: One or more times was not reported correctly") - failed = True + failed = 1 return failed |
